Re: [OE-core] Meson support in oe-core

2017-08-09 Thread Khem Raj
On Wed, Aug 9, 2017 at 2:10 PM, Randy MacLeod
 wrote:
> On 2017-08-07 09:47 AM, Alexander Kanavin wrote:
>>
>> On 08/07/2017 04:00 PM, Richard Purdie wrote:
>>
>>> Thanks for looking at this. Whilst some project still have some support
>>> for both, could we get timings of do_{configure|compile|install} for
>>> autotools vs. meson?
>>
>>
>> So far there's just one recipe that I can test, json-glib, which is fairly
>> small, and so there's not a lot of difference between compile+install steps.
>> configure however is vastly faster:
>>
>> autotools with gtk-doc
>>
>> configure 16.53
>> compile 12.56
>> install 1.94
>> total 31.03
>>
>> meson with gtk-doc
>>
>> configure 2.04
>> compile 4.87
>> install 9.16
>> total 16.07
>>
>> autotools without gtk-doc
>> configure 16.26
>> compile 5.49
>> install 1.59
>> total 23.34
>>
>> meson without gtk-doc
>> configure 1.95
>> compile 5.04
>> install 2.26
>> total 9.25
>
>
> Yep, total time for 'without gtk-doc' is *more* than cut in half!
>
> The drop in configure time is certainly expected but the compilation
> stage should be dominated by the compiler rather than make or ninja.
> The 'without gtk-doc' compile difference mostly confirms that
> but the 9% drop is odd. A couple of sources I've found assert that
> for large projects and parallel builds a full build time is essentially
> the same with ninja:
>http://david.rothlis.net/ninja-benchmark/
> That work was done on a MacBook (!!) so it would be interesting to
> see what the results are on a 24+ core Linux system. I might
> give that a try tonight if there's nothing good on NetFlix.
>

try chromium builds from meta-browser and play with ninja its a big enough
package.

> By the way, systemd-234 has meson support and you (Alex) have sent
> a patch update to 242 to the oe-core list but without switching to meson
> as is reasonable. Anyway, 232 takes 51 seconds on my 16+16 core machine
> so it would be a useful benchmark as well. Want to take a stab at that?
>
> ../Randy
>
>
>
>>
>>
>> Alex
>
>
>
> --
> # Randy MacLeod. SMTS, Linux, Wind River
> Direct: 613.963.1350 | 350 Terry Fox Drive, Suite 200, Ottawa, ON, Canada,
> K2K 2W5
>
> --
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] recipetool: create: disable PREMIRRORS and MIRRORS by default

2017-08-09 Thread Chang Rebecca Swee Fun
When creating new recipes, we are almost certainly fetching a new
source rather that something that has already been fetched. I have
disable PREMIRRORS and MIRRORS settings in the recipe that created
by devtool while leaving an option for users to enable them manually
if needed. Since devtool already has this options, we need to ensure
that recipetool is able to handle the options passed from devtool.

Signed-off-by: Chang Rebecca Swee Fun 
---
 scripts/lib/recipetool/create.py | 3 ++-
 scripts/lib/scriptutils.py   | 9 -
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index 359eb9a..f6ea422 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -446,7 +446,7 @@ def create_recipe(args):
 srctree = os.path.join(tempsrc, 'source')
 
 try:
-checksums, ftmpdir = scriptutils.fetch_url(tinfoil, srcuri, 
srcrev, srctree, logger, preserve_tmp=args.keep_temp)
+checksums, ftmpdir = scriptutils.fetch_url(tinfoil, srcuri, 
srcrev, srctree, logger, preserve_tmp=args.keep_temp, mirrors=args.mirrors)
 except scriptutils.FetchUrlFailure as e:
 logger.error(str(e))
 sys.exit(1)
@@ -1169,5 +1169,6 @@ def register_commands(subparsers):
 parser_create.add_argument('--keep-temp', action="store_true", help='Keep 
temporary directory (for debugging)')
 parser_create.add_argument('--fetch-dev', action="store_true", help='For 
npm, also fetch devDependencies')
 parser_create.add_argument('--devtool', action="store_true", 
help=argparse.SUPPRESS)
+parser_create.add_argument('--mirrors', action="store_true", help='Enable 
PREMIRRORS and MIRRORS for source tree fetching (disable by default).')
 parser_create.set_defaults(func=create_recipe)
 
diff --git a/scripts/lib/scriptutils.py b/scripts/lib/scriptutils.py
index 9785438..11f1a78 100644
--- a/scripts/lib/scriptutils.py
+++ b/scripts/lib/scriptutils.py
@@ -102,7 +102,7 @@ class FetchUrlFailure(Exception):
 def __str__(self):
 return "Failed to fetch URL %s" % self.url
 
-def fetch_url(tinfoil, srcuri, srcrev, destdir, logger, preserve_tmp=False):
+def fetch_url(tinfoil, srcuri, srcrev, destdir, logger, preserve_tmp=False, 
mirrors=False):
 """
 Fetch the specified URL using normal do_fetch and do_unpack tasks, i.e.
 any dependencies that need to be satisfied in order to support the fetch
@@ -150,6 +150,13 @@ def fetch_url(tinfoil, srcuri, srcrev, destdir, logger, 
preserve_tmp=False):
 f.write('WORKDIR = "%s"\n' % tmpworkdir)
 # Set S out of the way so it doesn't get created under the 
workdir
 f.write('S = "%s"\n' % os.path.join(tmpdir, 'emptysrc'))
+if not mirrors:
+# We do not need PREMIRRORS since we are almost certainly
+# fetching new source rather than something that has 
already
+# been fetched. Hence, we disable them by default.
+# However, we provide an option for users to enable it.
+f.write('PREMIRRORS = ""\n')
+f.write('MIRRORS = ""\n')
 
 logger.info('Fetching %s...' % srcuri)
 
-- 
2.7.4

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


[OE-core] [PATCH v4] externalsrc: Handle .git not being a directory

2017-08-09 Thread Joshua Watt
Use git rev-parse to determine the location of the .git directory, in
case it is not an immediate child of EXTERNALSRC (e.g. when using
submodules). In the event git can't resolve the .git directory, fall
back to the non-git method for hashing.

Signed-off-by: Joshua Watt 
---
 meta/classes/externalsrc.bbclass | 14 +++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass
index 9aabb426d9e..8141f25e041 100644
--- a/meta/classes/externalsrc.bbclass
+++ b/meta/classes/externalsrc.bbclass
@@ -184,11 +184,19 @@ def srctree_hash_files(d, srcdir=None):
 import tempfile
 
 s_dir = srcdir or d.getVar('EXTERNALSRC')
-git_dir = os.path.join(s_dir, '.git')
-oe_hash_file = os.path.join(git_dir, 'oe-devtool-tree-sha1')
+git_dir = None
+
+try:
+# git rev-parse returns the path relative to the current working
+# directory
+git_dir = os.path.join(s_dir,
+subprocess.check_output(['git', 'rev-parse', '--git-dir'], 
cwd=s_dir).decode("utf-8").rstrip())
+except subprocess.CalledProcessError:
+pass
 
 ret = " "
-if os.path.exists(git_dir):
+if git_dir is not None:
+oe_hash_file = os.path.join(git_dir, 'oe-devtool-tree-sha1')
 with tempfile.NamedTemporaryFile(prefix='oe-devtool-index') as 
tmp_index:
 # Clone index
 shutil.copyfile(os.path.join(git_dir, 'index'), tmp_index.name)
-- 
2.13.3

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


[OE-core] [PATCH 0/1] sysstat: fix creating configuration file for /var/log/sa

2017-08-09 Thread Chen Qi
The following changes since commit 5e4bd86130866d4a92fa7b0fa6d3628126dfdf91:

  libinput: Upgrade 1.7.3 -> 1.8.1 (2017-08-09 09:38:25 +0100)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib ChenQi/sysstat_conf
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/sysstat_conf

Chen Qi (1):
  sysstat: fix creating configuration file for /var/log/sa

 meta/recipes-extended/sysstat/sysstat.inc | 12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)

-- 
1.9.1

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


[OE-core] [PATCH 1/1] sysstat: fix creating configuration file for /var/log/sa

2017-08-09 Thread Chen Qi
Fix to create configuration file related to /var/log/sa for sysvinit
and systemd systems respectively.

Signed-off-by: Chen Qi 
---
 meta/recipes-extended/sysstat/sysstat.inc | 12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-extended/sysstat/sysstat.inc 
b/meta/recipes-extended/sysstat/sysstat.inc
index 18b0861..61da4cd 100644
--- a/meta/recipes-extended/sysstat/sysstat.inc
+++ b/meta/recipes-extended/sysstat/sysstat.inc
@@ -32,10 +32,16 @@ do_install() {
autotools_do_install
 
# don't install /var/log/sa when populating rootfs. Do it through 
volatile
-
rm -rf ${D}/var
-   install -d ${D}/etc/default/volatiles
-   install -m 0644 ${WORKDIR}/99_sysstat ${D}/etc/default/volatiles
+   if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', 
d)}; then
+   install -d ${D}/etc/default/volatiles
+   install -m 0644 ${WORKDIR}/99_sysstat ${D}/etc/default/volatiles
+   fi
+   if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', 
d)}; then
+   install -d ${D}${sysconfdir}/tmpfiles.d
+   echo "d ${localstatedir}/log/sa - - - -" \
+> ${D}${sysconfdir}/tmpfiles.d/sysstat.conf
+   fi
 
install -d ${D}${systemd_unitdir}/system
install -m 0644 ${WORKDIR}/sysstat.service ${D}${systemd_unitdir}/system
-- 
1.9.1

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


[OE-core] [PATCH v3] distrodata: add a utility script to compare list of recipes

2017-08-09 Thread Tan Shen Joon
distrocompare.sh is added to compare the added list of recipes
between two releases. The output of the script will share the
information of the licenses required and other distributions
that are using the package.

If a single input is provided, it will compare the current
branch with the provided branch/commit-ish package list.

To run : distrocompare.sh  
E.g. distrocompare.sh morty 92aa0e7
E.g. distrocompare.sh morty pyro
E.g. distrocompare.sh morty

output : The script will produce a file ending with
new_recipe_list.txt preceeded by the branch name from input

Signed-off-by: Tan Shen Joon 
---
 scripts/distro/build-recipe-list.py | 117 ++
 scripts/distro/distrocompare.sh | 123 
 2 files changed, 240 insertions(+)
 create mode 100755 scripts/distro/build-recipe-list.py
 create mode 100755 scripts/distro/distrocompare.sh

diff --git a/scripts/distro/build-recipe-list.py 
b/scripts/distro/build-recipe-list.py
new file mode 100755
index 000..407deba
--- /dev/null
+++ b/scripts/distro/build-recipe-list.py
@@ -0,0 +1,117 @@
+#!/usr/bin/env python3
+#
+# Copyright (c) 2017, Intel Corporation.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms and conditions of the GNU General Public License,
+# version 2, as published by the Free Software Foundation.
+#
+# This program is distributed in the hope 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.
+#
+
+import os
+import shutil
+import csv
+import sys
+import argparse
+
+__version__ = "0.1.0"
+
+recipenames = []
+allrecipes = []
+ 
+def gather_recipes(rows):
+# store the data into the array
+for row in rows:
+if row[0] not in recipenames:
+recipenames.append(row[0])
+allrecipes.append(row)
+
+def generate_recipe_list():
+# machine list
+machine_list = ( "qemuarm64", "qemuarm", "qemumips64", "qemumips", 
"qemuppc", "qemux86-64", "qemux86" )
+# set filename format
+fnformat = 'distrodata.%s.csv'
+
+# store all data files in distrodata
+datadir = 'distrodata'
+
+# create the directory if it does not exists
+if not os.path.exists(datadir):
+os.mkdir(datadir)
+
+# doing bitbake distrodata
+for machine in machine_list:
+os.system('MACHINE='+ machine + ' bitbake world -c distrodata')
+shutil.copy('tmp/log/distrodata.csv', 'distrodata/' + fnformat % 
machine)
+
+for machine in machine_list:
+with open('distrodata/' + fnformat % machine) as f:
+reader = csv.reader(f)
+rows = reader.__iter__()
+gather_recipes(rows)
+
+with open('recipe-list.txt', 'w') as f:
+for recipe in sorted(recipenames):
+f.write("%s\n" % recipe)
+print("file : recipe-list.txt is created with %d entries." % 
len(recipenames))
+
+with open('all-recipe-list.txt', 'w') as f:
+for recipe in sorted(allrecipes):
+f.write("%s\n" % ','.join([str(data) for data in recipe]))
+
+
+def diff_for_new_recipes(recipe1, recipe2):
+prev_recipe_path = recipe1 + '/'
+curr_recipe_path = recipe2 + '/'
+if not os.path.isfile(prev_recipe_path + 'recipe-list.txt') or not 
os.path.isfile(curr_recipe_path + 'recipe-list.txt'):
+print("recipe files do not exists. please verify that the file 
exists.")
+exit(1)
+
+import csv
+
+prev = []
+new = []
+
+with open(prev_recipe_path + 'recipe-list.txt') as f:
+prev = f.readlines()
+
+with open(curr_recipe_path + 'recipe-list.txt') as f:
+new = f.readlines()
+
+updates = []
+for pn in new:
+if not pn in prev:
+updates.append(pn.rstrip())
+
+allrecipe = []
+with open(recipe1 + '_' + recipe2 + '_new_recipe_list.txt','w') as dr:
+with open(curr_recipe_path + 'all-recipe-list.txt') as f:
+reader = csv.reader(f, delimiter=',')
+for row in reader:
+if row[0] in updates:
+dr.write("%s,%s,%s" % (row[0], row[3], row[5]))
+if len(row[9:]) > 0:
+dr.write(",%s" % ','.join(row[9:]))
+dr.write("\n")
+
+def main(argv):
+if argv[0] == "generate_recipe_list":
+generate_recipe_list()
+elif argv[0] == "compare_recipe":
+diff_for_new_recipes(argv[1], argv[2])
+else:
+print("no such option. choose either 'generate_recipe_list' or 
'compare_recipe'")
+
+exit(0)
+
+if __name__ == "__main__":
+try:
+sys.exit(main(sys.argv[1:]))
+except Exception as e:
+print("Exception :", e)
+sys.exit(1)
+
diff --git a/scripts/distro/distrocompare.sh b/scripts/distro/distrocompare.sh
new file mode 100755
index 000..908760c
--- 

Re: [OE-core] Meson support in oe-core

2017-08-09 Thread Burton, Ross
On 9 August 2017 at 22:10, Randy MacLeod 
wrote:

> Yep, total time for 'without gtk-doc' is *more* than cut in half!
>

gtk-doc does some large XSLT transforms, which are single-threaded.  There
is a plan to move gtk-doc to use a simpler set of transformations which
should give an improvement there (or rewrite libxslt to be parallel, but
thats harder).

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


Re: [OE-core] Meson support in oe-core

2017-08-09 Thread Randy MacLeod

On 2017-08-07 09:47 AM, Alexander Kanavin wrote:

On 08/07/2017 04:00 PM, Richard Purdie wrote:


Thanks for looking at this. Whilst some project still have some support
for both, could we get timings of do_{configure|compile|install} for
autotools vs. meson?


So far there's just one recipe that I can test, json-glib, which is 
fairly small, and so there's not a lot of difference between 
compile+install steps. configure however is vastly faster:


autotools with gtk-doc

configure 16.53
compile 12.56
install 1.94
total 31.03

meson with gtk-doc

configure 2.04
compile 4.87
install 9.16
total 16.07

autotools without gtk-doc
configure 16.26
compile 5.49
install 1.59
total 23.34

meson without gtk-doc
configure 1.95
compile 5.04
install 2.26
total 9.25


Yep, total time for 'without gtk-doc' is *more* than cut in half!

The drop in configure time is certainly expected but the compilation
stage should be dominated by the compiler rather than make or ninja.
The 'without gtk-doc' compile difference mostly confirms that
but the 9% drop is odd. A couple of sources I've found assert that
for large projects and parallel builds a full build time is essentially
the same with ninja:
   http://david.rothlis.net/ninja-benchmark/
That work was done on a MacBook (!!) so it would be interesting to
see what the results are on a 24+ core Linux system. I might
give that a try tonight if there's nothing good on NetFlix.

By the way, systemd-234 has meson support and you (Alex) have sent
a patch update to 242 to the oe-core list but without switching to meson
as is reasonable. Anyway, 232 takes 51 seconds on my 16+16 core machine
so it would be a useful benchmark as well. Want to take a stab at that?

../Randy






Alex



--
# Randy MacLeod. SMTS, Linux, Wind River
Direct: 613.963.1350 | 350 Terry Fox Drive, Suite 200, Ottawa, ON, 
Canada, K2K 2W5

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


[OE-core] [PATCH] python3-docutils: update to 0.14

2017-08-09 Thread Jose Lamego
python3-docutils recipe must be upgraded to latest stable release.

LIC_FILES_CHKSUM changed due to a typo fix from previous version,
but license type and information remained the same.

This change was tested on qemu with core-image-minimal.

Signed-off-by: Jose Lamego 
---
 .../python/{python3-docutils_0.13.1.bb => python3-docutils_0.14.bb} | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
 rename meta/recipes-devtools/python/{python3-docutils_0.13.1.bb => 
python3-docutils_0.14.bb} (60%)

diff --git a/meta/recipes-devtools/python/python3-docutils_0.13.1.bb 
b/meta/recipes-devtools/python/python3-docutils_0.14.bb
similarity index 60%
rename from meta/recipes-devtools/python/python3-docutils_0.13.1.bb
rename to meta/recipes-devtools/python/python3-docutils_0.14.bb
index e36388c..81a449d 100644
--- a/meta/recipes-devtools/python/python3-docutils_0.13.1.bb
+++ b/meta/recipes-devtools/python/python3-docutils_0.14.bb
@@ -2,13 +2,13 @@ SUMMARY = "Text processing system for documentation"
 HOMEPAGE = "http://docutils.sourceforge.net;
 SECTION = "devel/python"
 LICENSE = "PSF & BSD-2-Clause & GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING.txt;md5=7a4646907ab9083c826280b19e103106"
+LIC_FILES_CHKSUM = "file://COPYING.txt;md5=35a23d42b615470583563132872c97d6"
 
 DEPENDS = "python3"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/docutils/docutils-${PV}.tar.gz"
-SRC_URI[md5sum] = "ea4a893c633c788be9b8078b6b305d53"
-SRC_URI[sha256sum] = 
"718c0f5fb677be0f34b781e04241c4067cbd9327b66bdd8e763201130f5175be"
+SRC_URI[md5sum] = "c53768d63db3873b7d452833553469de"
+SRC_URI[sha256sum] = 
"51e64ef2ebfb29cae1faa133b3710143496eca21c530f3f71424d77687764274"
 
 S = "${WORKDIR}/docutils-${PV}"
 
-- 
2.7.4

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


Re: [OE-core] [PATCH 6/7] oprofile: update to 1.2.0

2017-08-09 Thread Burton, Ross
Breaks with musl:

http://errors.yoctoproject.org/Errors/Details/150200/

Ross

On 7 August 2017 at 12:45, Alexander Kanavin <
alexander.kana...@linux.intel.com> wrote:

> Drop upstreamed 0001-Fix-FTBFS-problem-with-GCC-6.patch
>
> Signed-off-by: Alexander Kanavin 
> ---
>  meta/recipes-kernel/oprofile/oprofile.inc  |  1 -
>  .../0001-Fix-FTBFS-problem-with-GCC-6.patch| 51
> --
>  meta/recipes-kernel/oprofile/oprofile_1.1.0.bb | 10 -
>  meta/recipes-kernel/oprofile/oprofile_1.2.0.bb | 10 +
>  4 files changed, 10 insertions(+), 62 deletions(-)
>  delete mode 100644 meta/recipes-kernel/oprofile/oprofile/0001-Fix-FTBFS-
> problem-with-GCC-6.patch
>  delete mode 100644 meta/recipes-kernel/oprofile/oprofile_1.1.0.bb
>  create mode 100644 meta/recipes-kernel/oprofile/oprofile_1.2.0.bb
>
> diff --git a/meta/recipes-kernel/oprofile/oprofile.inc
> b/meta/recipes-kernel/oprofile/oprofile.inc
> index 4b01654fa3e..83fc8435cbd 100644
> --- a/meta/recipes-kernel/oprofile/oprofile.inc
> +++ b/meta/recipes-kernel/oprofile/oprofile.inc
> @@ -25,7 +25,6 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz
> \
> file://run-ptest \
> file://root-home-dir.patch \
> file://0001-Add-rmb-definition-for-NIOS2-architecture.patch \
> -   file://0001-Fix-FTBFS-problem-with-GCC-6.patch \
>  "
>  UPSTREAM_CHECK_REGEX = "oprofile-(?P\d+(\.\d+)+)/"
>  UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/oprofile/files/
> oprofile/"
> diff --git 
> a/meta/recipes-kernel/oprofile/oprofile/0001-Fix-FTBFS-problem-with-GCC-6.patch
> b/meta/recipes-kernel/oprofile/oprofile/0001-Fix-
> FTBFS-problem-with-GCC-6.patch
> deleted file mode 100644
> index d372fd527ba..000
> --- a/meta/recipes-kernel/oprofile/oprofile/0001-Fix-
> FTBFS-problem-with-GCC-6.patch
> +++ /dev/null
> @@ -1,51 +0,0 @@
> -From 39d4d46a0bd504ac708ffe72df87bf74cd12ad30 Mon Sep 17 00:00:00 2001
> -From: William Cohen 
> -Date: Fri, 5 Feb 2016 17:30:19 -0500
> -Subject: [PATCH] Fix FTBFS problem with GCC-6
> -
> -GCC-6 is pickier about some of the type conversions causing the Fedora
> -24 mass rebuild the build of oprofile failed with:
> -
> -make[3]: Entering directory '/builddir/build/BUILD/
> oprofile-1.1.0/libutil++'
> -g++ -DHAVE_CONFIG_H -I. -I..  -I ../libutil -I ../libop -I ../libpp   -W
> -Wall -fno-common -ftemplate-depth-50 -O2 -g -pipe -Wall
> -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
> -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
> -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m32 -march=i686
> -mtune=atom -fasynchronous-unwind-tables -c -o op_bfd.o op_bfd.cpp
> -op_bfd.cpp: In member function 'void op_bfd::get_symbol_range(symbol_index_t,
> long long unsigned int&, long long unsigned int&) const':
> -op_bfd.cpp:538:47: error: cannot convert 'std::ostream {aka
> std::basic_ostream}' to 'const bool' in initialization
> -  bool const verbose = cverb << (vbfd & vlevel1);
> -   ^
> -op_bfd.cpp:546:7: error: in argument to unary !
> -  if (!verbose)
> -   ^~~
> -
> -Avoid the intermediate bool type to make GCC-6 happy.
> -
> -Signed-off-by: William Cohen 
> 
> -Upstream-Status: Backport
> -
> - libutil++/op_bfd.cpp | 4 +---
> - 1 file changed, 1 insertion(+), 3 deletions(-)
> -
> -diff --git a/libutil++/op_bfd.cpp b/libutil++/op_bfd.cpp
> -index 389c920..f2eb42b 100644
>  a/libutil++/op_bfd.cpp
> -+++ b/libutil++/op_bfd.cpp
> -@@ -535,15 +535,13 @@ void op_bfd::get_symbol_range(symbol_index_t
> sym_idx,
> - {
> -   op_bfd_symbol const & sym = syms[sym_idx];
> -
> --  bool const verbose = cverb << (vbfd & vlevel1);
> --
> -   if (anon_obj)
> -   start = sym.vma();
> -   else
> -   start = sym.filepos();
> -   end = start + sym.size();
> -
> --  if (!verbose)
> -+  if (!(cverb << (vbfd & vlevel1)))
> -   return;
> -
> -   io_state state(cverb << (vbfd & vlevel1));
> ---
> -1.9.1
> -
> diff --git a/meta/recipes-kernel/oprofile/oprofile_1.1.0.bb
> b/meta/recipes-kernel/oprofile/oprofile_1.1.0.bb
> deleted file mode 100644
> index 92a94ad0d4d..000
> --- a/meta/recipes-kernel/oprofile/oprofile_1.1.0.bb
> +++ /dev/null
> @@ -1,10 +0,0 @@
> -require oprofile.inc
> -
> -DEPENDS += "virtual/kernel"
> -DEPENDS_append_powerpc64 = " libpfm4"
> -
> -SRC_URI[md5sum] = "248c4c069f9476f427fa7195563f9867"
> -SRC_URI[sha256sum] = "cf759a6de1a6033d5dfc93bda129a9
> f2e128aecc4238cc657feb0801d1b0366c"
> -
> -S = "${WORKDIR}/oprofile-${PV}"
> -
> diff --git a/meta/recipes-kernel/oprofile/oprofile_1.2.0.bb
> b/meta/recipes-kernel/oprofile/oprofile_1.2.0.bb
> new file mode 100644
> index 000..e85e805c37c
> --- /dev/null
> +++ b/meta/recipes-kernel/oprofile/oprofile_1.2.0.bb
> @@ -0,0 +1,10 @@
> +require oprofile.inc
> +

Re: [OE-core] [PATCH V2 1/1] ltp: upgrade to upstream latest commit on 20170804

2017-08-09 Thread Burton, Ross
Breaks with musl:

http://errors.yoctoproject.org/Errors/Details/150199/

Ross

On 4 August 2017 at 11:00, Dengke Du  wrote:

> drop 4 patches because the upstream already contains them:
>
> 0001-dirtyc0w-Include-stdint.h.patch
> 0006-fix-PATH_MAX-undeclared-when-building-with-musl.patch
> 0037-faccessat-and-fchmodat-Fix-build-warnings.patch
> 0038-syscalls-add_key02-update-to-test-fix-for-nonempty-N.patch
>
> drop the do_compile_prepend function, because the upstream already fix
> the parallel make race, we can check it here:
>
> https://github.com/linux-test-project/ltp/commit/
> 3f385652efe811fe7491474f8513baf44cf0a12d
>
> Signed-off-by: Dengke Du 
> ---
>  .../ltp/ltp/0001-dirtyc0w-Include-stdint.h.patch   |  34 --
>  ...TH_MAX-undeclared-when-building-with-musl.patch |  31 -
>  ...faccessat-and-fchmodat-Fix-build-warnings.patch |  68 ---
>  ...d_key02-update-to-test-fix-for-nonempty-N.patch | 136
> -
>  meta/recipes-extended/ltp/ltp_20170516.bb  |  14 +--
>  5 files changed, 1 insertion(+), 282 deletions(-)
>  delete mode 100644 meta/recipes-extended/ltp/ltp/
> 0001-dirtyc0w-Include-stdint.h.patch
>  delete mode 100644 meta/recipes-extended/ltp/ltp/
> 0006-fix-PATH_MAX-undeclared-when-building-with-musl.patch
>  delete mode 100644 meta/recipes-extended/ltp/ltp/
> 0037-faccessat-and-fchmodat-Fix-build-warnings.patch
>  delete mode 100644 meta/recipes-extended/ltp/ltp/0038-syscalls-add_key02-
> update-to-test-fix-for-nonempty-N.patch
>
> diff --git 
> a/meta/recipes-extended/ltp/ltp/0001-dirtyc0w-Include-stdint.h.patch
> b/meta/recipes-extended/ltp/ltp/0001-dirtyc0w-Include-stdint.h.patch
> deleted file mode 100644
> index 5c73be4..000
> --- a/meta/recipes-extended/ltp/ltp/0001-dirtyc0w-Include-stdint.h.patch
> +++ /dev/null
> @@ -1,34 +0,0 @@
> -From 1b30d8dac1a37dc0abbb3b545db2824d6489e23f Mon Sep 17 00:00:00 2001
> -From: Khem Raj 
> -Date: Fri, 9 Jun 2017 09:32:13 -0700
> -Subject: [PATCH] dirtyc0w: Include stdint.h
> -
> -uintptr_t is defined in stdint.h
> -
> -Fixes
> -| dirtyc0w_child.c:76:15: error: 'uintptr_t' undeclared (first use in
> this function); did you mean 'intptr_t'?
> -|lseek(mfd, (uintptr_t) map, SEEK_SET);
> -|^
> -
> -Signed-off-by: Khem Raj 
> 
> -Upstream-Status: Submitted
> -
> - testcases/kernel/security/dirtyc0w/dirtyc0w_child.c | 1 +
> - 1 file changed, 1 insertion(+)
> -
> -diff --git a/testcases/kernel/security/dirtyc0w/dirtyc0w_child.c
> b/testcases/kernel/security/dirtyc0w/dirtyc0w_child.c
> -index 5328a9bc4..49abdd6ba 100644
>  a/testcases/kernel/security/dirtyc0w/dirtyc0w_child.c
> -+++ b/testcases/kernel/security/dirtyc0w/dirtyc0w_child.c
> -@@ -23,6 +23,7 @@
> - #include 
> - #include 
> - #include 
> -+#include 
> - #include 
> -
> - #include "tst_safe_pthread.h"
> ---
> -2.13.1
> -
> diff --git a/meta/recipes-extended/ltp/ltp/0006-fix-PATH_MAX-
> undeclared-when-building-with-musl.patch b/meta/recipes-extended/ltp/
> ltp/0006-fix-PATH_MAX-undeclared-when-building-with-musl.patch
> deleted file mode 100644
> index 020ddfe..000
> --- a/meta/recipes-extended/ltp/ltp/0006-fix-PATH_MAX-
> undeclared-when-building-with-musl.patch
> +++ /dev/null
> @@ -1,31 +0,0 @@
> -From b906ec2fe4711a727e198cd9259287c042eef8e2 Mon Sep 17 00:00:00 2001
> -From: Dengke Du 
> -Date: Thu, 9 Feb 2017 16:41:12 +0800
> -Subject: [PATCH] fix PATH_MAX undeclared when building with musl
> -
> -fix PATH_MAX undeclared when building with musl.
> -
> -Upstream-Status: Submitted [https://github.com/linux-
> test-project/ltp/pull/176]
> -
> -Signed-off-by: Dengke Du 
> 
> - include/tst_test.h | 3 +++
> - 1 file changed, 3 insertions(+)
> -
> -diff --git a/include/tst_test.h b/include/tst_test.h
> -index 335c82684..4dfa1511b 100644
>  a/include/tst_test.h
> -+++ b/include/tst_test.h
> -@@ -23,6 +23,9 @@
> - #endif /* __TEST_H__ */
> -
> - #include 
> -+#ifndef __GLIBC__
> -+#include 
> -+#endif
> -
> - #include "tst_common.h"
> - #include "tst_res_flags.h"
> ---
> -2.11.0
> -
> diff --git a/meta/recipes-extended/ltp/ltp/0037-faccessat-and-
> fchmodat-Fix-build-warnings.patch b/meta/recipes-extended/ltp/
> ltp/0037-faccessat-and-fchmodat-Fix-build-warnings.patch
> deleted file mode 100644
> index 99497d6..000
> --- a/meta/recipes-extended/ltp/ltp/0037-faccessat-and-
> fchmodat-Fix-build-warnings.patch
> +++ /dev/null
> @@ -1,68 +0,0 @@
> -From 4141bdb441f7576a2e73abeb2a0fb1c7b8bd8647 Mon Sep 17 00:00:00 2001
> -From: Naresh Kamboju 
> -Date: Mon, 19 Jun 2017 19:01:21 +0530
> -Subject: [PATCH 1/7] faccessat and fchmodat: Fix build warnings
> -MIME-Version: 1.0
> -Content-Type: text/plain; charset=UTF-8
> -Content-Transfer-Encoding: 8bit
> -
> -Fixing below build warnings.
> -
> 

[OE-core] [PATCH] python*-setuptools: update to 36.2.7

2017-08-09 Thread Jose Lamego
Both python-setuptools and python3-setuptools must be updated
to latest stable release.

These changes were tested on qemu with core-image-minimal

Signed-off-by: Jose Lamego 
---
 meta/recipes-devtools/python/python-setuptools.inc| 4 ++--
 .../{python-setuptools_36.2.0.bb => python-setuptools_36.2.7.bb}  | 0
 .../{python3-setuptools_36.2.0.bb => python3-setuptools_36.2.7.bb}| 0
 3 files changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-devtools/python/{python-setuptools_36.2.0.bb => 
python-setuptools_36.2.7.bb} (100%)
 rename meta/recipes-devtools/python/{python3-setuptools_36.2.0.bb => 
python3-setuptools_36.2.7.bb} (100%)

diff --git a/meta/recipes-devtools/python/python-setuptools.inc 
b/meta/recipes-devtools/python/python-setuptools.inc
index cd84233..ca521a9 100644
--- a/meta/recipes-devtools/python/python-setuptools.inc
+++ b/meta/recipes-devtools/python/python-setuptools.inc
@@ -9,8 +9,8 @@ SRCNAME = "setuptools"
 
 SRC_URI = 
"https://files.pythonhosted.org/packages/source/s/${SRCNAME}/${SRCNAME}-${PV}.zip;
 
-SRC_URI[md5sum] = "60df703040ad8024d24727dc95483740"
-SRC_URI[sha256sum] = 
"4c2bda3829c9dbbe9c2b33d89c4b1cb6d45813615ab8e248ad352e3697a96d81"
+SRC_URI[md5sum] = "b9e6c049617bac0f9e908a41ab4a29ac"
+SRC_URI[sha256sum] = 
"b0fe5d432d922df595e918577c51458d63f245115d141b309ac32ecfca329df5"
 
 UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/setuptools;
 
diff --git a/meta/recipes-devtools/python/python-setuptools_36.2.0.bb 
b/meta/recipes-devtools/python/python-setuptools_36.2.7.bb
similarity index 100%
rename from meta/recipes-devtools/python/python-setuptools_36.2.0.bb
rename to meta/recipes-devtools/python/python-setuptools_36.2.7.bb
diff --git a/meta/recipes-devtools/python/python3-setuptools_36.2.0.bb 
b/meta/recipes-devtools/python/python3-setuptools_36.2.7.bb
similarity index 100%
rename from meta/recipes-devtools/python/python3-setuptools_36.2.0.bb
rename to meta/recipes-devtools/python/python3-setuptools_36.2.7.bb
-- 
2.7.4

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


Re: [OE-core] [PATCH 4/4] cairo: Add pkgconfig for opengl support

2017-08-09 Thread Khem Raj
On Wed, Aug 9, 2017 at 11:24 AM, Andre McCurdy  wrote:
> On Wed, Aug 9, 2017 at 11:11 AM, Khem Raj  wrote:
>> On 8/9/17 8:41 AM, Andre McCurdy wrote:
>>> On Wed, Aug 9, 2017 at 7:19 AM, Khem Raj  wrote:
 Signed-off-by: Khem Raj 
>>>
>>> Any explanation? Was this previously non-deterministic? If so, how far
>>> back does the problem go?
>>
>> it isnt non-deterministic atleast not after RSS. However, we need this
>> enabled when we have openGL/X11 enabled.
>>
>>>
 ---
  meta/recipes-graphics/cairo/cairo.inc | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)

 diff --git a/meta/recipes-graphics/cairo/cairo.inc 
 b/meta/recipes-graphics/cairo/cairo.inc
 index 8e1e2e1b88..fd376951bd 100644
 --- a/meta/recipes-graphics/cairo/cairo.inc
 +++ b/meta/recipes-graphics/cairo/cairo.inc
 @@ -22,7 +22,8 @@ X11DEPENDS = "virtual/libx11 libsm libxrender libxext"
  DEPENDS = "libpng fontconfig pixman glib-2.0 zlib"

  PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 
 xcb', '', d)} \
 -   ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)}"
 +   ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)} \
 +   ${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"

  PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no 
 --disable-xlib,${X11DEPENDS}"
  PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"
 @@ -30,6 +31,7 @@ PACKAGECONFIG[directfb] = 
 "--enable-directfb=yes,,directfb"
  PACKAGECONFIG[valgrind] = 
 "--enable-valgrind=yes,--disable-valgrind,valgrind"
  PACKAGECONFIG[egl] = "--enable-egl=yes,--disable-egl,virtual/egl"
  PACKAGECONFIG[glesv2] = 
 "--enable-glesv2,--disable-glesv2,virtual/libgles2"
 +PACKAGECONFIG[opengl] = "--enable-gl,--disable-gl,virtual/libgl"
>>>
>>> Since the opengl distro feature can imply either OpenGL or OpenGL ES
>>> support, it doesn't seem right to use it to select one over the other
>>> (ie for recipes which support both, shouldn't the choice between
>>> OpenGL or OpenGL ES be independent of the opengl distro feature) ?
>>
>> at some point we differentiated between opengl and gles at distro level
>> atleast for RDK, but I agree that marking opengl as a distro feature
>> encompassing all OpenGL implementations is better. Although, in this
>> particular case all openGL implementations can be enabled simultaneously
>
> According to the tests in the configure script it looks like a choice
> between OpenGL or OpenGL ES, not both.
>
>> so may be we can enable egl and gles too with same knob. Alternatively
>> We can leave the packageconfig knob disabled which will make it same
>> defaults effectively ( which is disabled)
>
> Either leave it disabled or enable it conditionally based on both the
> opengl and x11 distro features?

could be a way forward.

>
>>
>>>

  #check for TARGET_FPU=soft and inform configure of the result so it can 
 disable some floating points
  require cairo-fpu.inc
 --
 2.14.0

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


Re: [OE-core] [PATCH v3 11/11] poky-reproducible.conf: Initial version

2017-08-09 Thread Andre McCurdy
On Wed, Aug 9, 2017 at 10:48 AM, Juro Bystricky
 wrote:
> Simplify building reproducible images by using
>
> DISTRO="poky-reproducible"
>
> Sets some variables to reasonable values so users do not
> have to set them in local.conf.
>
> Signed-off-by: Juro Bystricky 
> ---
>  meta-poky/conf/distro/include/reproducible-group  | 50 
> +++
>  meta-poky/conf/distro/include/reproducible-passwd | 25 
>  meta-poky/conf/distro/poky-reproducible.conf  | 38 +
>  3 files changed, 113 insertions(+)
>  create mode 100644 meta-poky/conf/distro/include/reproducible-group
>  create mode 100644 meta-poky/conf/distro/include/reproducible-passwd
>  create mode 100644 meta-poky/conf/distro/poky-reproducible.conf
>
> diff --git a/meta-poky/conf/distro/include/reproducible-group 
> b/meta-poky/conf/distro/include/reproducible-group
> new file mode 100644
> index 000..4213d4e
> --- /dev/null
> +++ b/meta-poky/conf/distro/include/reproducible-group
> @@ -0,0 +1,50 @@
> +root:x:0:
> +daemon:x:1:
> +bin:x:2:
> +sys:x:3:
> +adm:x:4:
> +tty:x:5:
> +disk:x:6:
> +lp:x:7:
> +mail:x:8:
> +news:x:9:
> +uucp:x:10:
> +man:x:12:
> +proxy:x:13:
> +kmem:x:15:
> +input:x:19:
> +dialout:x:20:
> +fax:x:21:
> +voice:x:22:
> +cdrom:x:24:
> +floppy:x:25:
> +tape:x:26:
> +sudo:x:27:
> +audio:x:29:pulse
> +dip:x:30:
> +www-data:x:33:
> +backup:x:34:
> +operator:x:37:
> +list:x:38:
> +irc:x:39:
> +src:x:40:
> +gnats:x:41:
> +shadow:x:42:
> +utmp:x:43:
> +video:x:44:
> +sasl:x:45:
> +plugdev:x:46:
> +staff:x:50:
> +games:x:60:
> +shutdown:x:70:
> +users:x:100:
> +crontab:x:993:
> +sshd:x:994:
> +avahi:x:995:
> +rpcuser:x:996:
> +rpc:x:997:
> +messagebus:x:998:
> +netdev:x:999:
> +tracing:x:1000:
> +pulse:x:1001:pulse
> +nogroup:x:65534:
> diff --git a/meta-poky/conf/distro/include/reproducible-passwd 
> b/meta-poky/conf/distro/include/reproducible-passwd
> new file mode 100644
> index 000..876195e
> --- /dev/null
> +++ b/meta-poky/conf/distro/include/reproducible-passwd
> @@ -0,0 +1,25 @@
> +root:x:0:0:root:/home/root:/bin/sh
> +daemon:x:1:1:daemon:/usr/sbin:/bin/sh
> +bin:x:2:2:bin:/bin:/bin/sh
> +sys:x:3:3:sys:/dev:/bin/sh
> +sync:x:4:65534:sync:/bin:/bin/sync
> +games:x:5:60:games:/usr/games:/bin/sh
> +man:x:6:12:man:/var/cache/man:/bin/sh
> +lp:x:7:7:lp:/var/spool/lpd:/bin/sh
> +mail:x:8:8:mail:/var/mail:/bin/sh
> +news:x:9:9:news:/var/spool/news:/bin/sh
> +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
> +proxy:x:13:13:proxy:/bin:/bin/sh
> +www-data:x:33:33:www-data:/var/www:/bin/sh
> +backup:x:34:34:backup:/var/backups:/bin/sh
> +list:x:38:38:Mailing List Manager:/var/list:/bin/sh
> +irc:x:39:39:ircd:/var/run/ircd:/bin/sh
> +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
> +pulse:x:993:1001::/var/run/pulse:/bin/false
> +distcc:x:994:65534::/dev/null:/bin/sh
> +sshd:x:995:994::/var/run/sshd:/bin/false
> +avahi:x:996:995::/var/run/avahi-daemon:/bin/false
> +rpcuser:x:997:996::/var/lib/nfs:/bin/false
> +rpc:x:998:997::/:/bin/false
> +messagebus:x:999:998::/var/lib/dbus:/bin/false
> +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
> diff --git a/meta-poky/conf/distro/poky-reproducible.conf 
> b/meta-poky/conf/distro/poky-reproducible.conf
> new file mode 100644
> index 000..c94f673
> --- /dev/null
> +++ b/meta-poky/conf/distro/poky-reproducible.conf
> @@ -0,0 +1,38 @@
> +require conf/distro/poky.conf
> +DISTRO = "poky-reproducible"
> +
> +BUILD_REPRODUCIBLE_BINARIES = "1"
> +REPRODUCIBLE_TIMESTAMP_ROOTFS ?= "1483228802"
> +LDCONFIGDEPEND = ""

Perhaps this should be disabling the ldconfig distro feature instead?

(Which implies the value of LDCONFIGDEPEND set in image.bbclass should
be updated to be conditional on the ldconfig distro feature too).

> +do_image_cpio[depends] += "cpio-replacement-native:do_populate_sysroot"
> +EXTRANATIVEPATH += "cpio-native"
> +IMAGE_CMD_CPIO = "cpio --ignore-devno --reproducible "
> +
> +IMAGE_CMD_TAR = "tar -v --sort=name "
> +
> +PACKAGE_CLASSES ="package_deb"
> +
> +# For reproducibility, we need to consistently assign the UID/GID values.
> +# Use the static uid and gid mechanism from OE-core for that:
> +# 
> http://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#ref-classes-useradd
> +#
> +# Dynamically assigned IDs are detected and lead to an error during
> +# the build.
> +#
> +# Developers who need to add new entries should add their own mapping
> +# file to USERADD_UID_TABLES and/or USERADD_GID_TABLES, either in a
> +# derived distro config or in their local.conf.
> +#
> +# It is also possible to disable the mechanism by modifying 
> USERADD_ERROR_DYNAMIC:
> +# "warn" merely prints a warning, empty value silently allows dynamic
> +# ID allocation.
> +#
> +# The actual files for UID/GID values come from core-image-minimal-sdk
> +# /etc/group
> +# /etc/passwd
> +
> +USERADDEXTENSION = "useradd-staticids"
> +USERADD_ERROR_DYNAMIC ??= "error"
> +USERADD_UID_TABLES 

Re: [OE-core] [PATCH 4/4] cairo: Add pkgconfig for opengl support

2017-08-09 Thread Andre McCurdy
On Wed, Aug 9, 2017 at 11:11 AM, Khem Raj  wrote:
> On 8/9/17 8:41 AM, Andre McCurdy wrote:
>> On Wed, Aug 9, 2017 at 7:19 AM, Khem Raj  wrote:
>>> Signed-off-by: Khem Raj 
>>
>> Any explanation? Was this previously non-deterministic? If so, how far
>> back does the problem go?
>
> it isnt non-deterministic atleast not after RSS. However, we need this
> enabled when we have openGL/X11 enabled.
>
>>
>>> ---
>>>  meta/recipes-graphics/cairo/cairo.inc | 4 +++-
>>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/meta/recipes-graphics/cairo/cairo.inc 
>>> b/meta/recipes-graphics/cairo/cairo.inc
>>> index 8e1e2e1b88..fd376951bd 100644
>>> --- a/meta/recipes-graphics/cairo/cairo.inc
>>> +++ b/meta/recipes-graphics/cairo/cairo.inc
>>> @@ -22,7 +22,8 @@ X11DEPENDS = "virtual/libx11 libsm libxrender libxext"
>>>  DEPENDS = "libpng fontconfig pixman glib-2.0 zlib"
>>>
>>>  PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 
>>> xcb', '', d)} \
>>> -   ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)}"
>>> +   ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)} \
>>> +   ${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"
>>>
>>>  PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no 
>>> --disable-xlib,${X11DEPENDS}"
>>>  PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"
>>> @@ -30,6 +31,7 @@ PACKAGECONFIG[directfb] = 
>>> "--enable-directfb=yes,,directfb"
>>>  PACKAGECONFIG[valgrind] = 
>>> "--enable-valgrind=yes,--disable-valgrind,valgrind"
>>>  PACKAGECONFIG[egl] = "--enable-egl=yes,--disable-egl,virtual/egl"
>>>  PACKAGECONFIG[glesv2] = "--enable-glesv2,--disable-glesv2,virtual/libgles2"
>>> +PACKAGECONFIG[opengl] = "--enable-gl,--disable-gl,virtual/libgl"
>>
>> Since the opengl distro feature can imply either OpenGL or OpenGL ES
>> support, it doesn't seem right to use it to select one over the other
>> (ie for recipes which support both, shouldn't the choice between
>> OpenGL or OpenGL ES be independent of the opengl distro feature) ?
>
> at some point we differentiated between opengl and gles at distro level
> atleast for RDK, but I agree that marking opengl as a distro feature
> encompassing all OpenGL implementations is better. Although, in this
> particular case all openGL implementations can be enabled simultaneously

According to the tests in the configure script it looks like a choice
between OpenGL or OpenGL ES, not both.

> so may be we can enable egl and gles too with same knob. Alternatively
> We can leave the packageconfig knob disabled which will make it same
> defaults effectively ( which is disabled)

Either leave it disabled or enable it conditionally based on both the
opengl and x11 distro features?

>
>>
>>>
>>>  #check for TARGET_FPU=soft and inform configure of the result so it can 
>>> disable some floating points
>>>  require cairo-fpu.inc
>>> --
>>> 2.14.0
>>>
>>> --
>>> ___
>>> Openembedded-core mailing list
>>> Openembedded-core@lists.openembedded.org
>>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 4/4] cairo: Add pkgconfig for opengl support

2017-08-09 Thread Khem Raj
On Wed, Aug 9, 2017 at 11:16 AM, Burton, Ross  wrote:
> Breaks the no-x11 builder:
> https://autobuilder.yoctoproject.org/main/builders/nightly-no-x11/builds/543/steps/BuildImages/logs/stdio
>

yes I was expecting that

> Ross
>
> On 9 August 2017 at 19:11, Khem Raj  wrote:
>>
>> On 8/9/17 8:41 AM, Andre McCurdy wrote:
>> > On Wed, Aug 9, 2017 at 7:19 AM, Khem Raj  wrote:
>> >> Signed-off-by: Khem Raj 
>> >
>> > Any explanation? Was this previously non-deterministic? If so, how far
>> > back does the problem go?
>>
>> it isnt non-deterministic atleast not after RSS. However, we need this
>> enabled when we have openGL/X11 enabled.
>>
>> >
>> >> ---
>> >>  meta/recipes-graphics/cairo/cairo.inc | 4 +++-
>> >>  1 file changed, 3 insertions(+), 1 deletion(-)
>> >>
>> >> diff --git a/meta/recipes-graphics/cairo/cairo.inc
>> >> b/meta/recipes-graphics/cairo/cairo.inc
>> >> index 8e1e2e1b88..fd376951bd 100644
>> >> --- a/meta/recipes-graphics/cairo/cairo.inc
>> >> +++ b/meta/recipes-graphics/cairo/cairo.inc
>> >> @@ -22,7 +22,8 @@ X11DEPENDS = "virtual/libx11 libsm libxrender
>> >> libxext"
>> >>  DEPENDS = "libpng fontconfig pixman glib-2.0 zlib"
>> >>
>> >>  PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11
>> >> xcb', '', d)} \
>> >> -   ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)}"
>> >> +   ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)} \
>> >> +   ${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"
>> >>
>> >>  PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no
>> >> --disable-xlib,${X11DEPENDS}"
>> >>  PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"
>> >> @@ -30,6 +31,7 @@ PACKAGECONFIG[directfb] =
>> >> "--enable-directfb=yes,,directfb"
>> >>  PACKAGECONFIG[valgrind] =
>> >> "--enable-valgrind=yes,--disable-valgrind,valgrind"
>> >>  PACKAGECONFIG[egl] = "--enable-egl=yes,--disable-egl,virtual/egl"
>> >>  PACKAGECONFIG[glesv2] =
>> >> "--enable-glesv2,--disable-glesv2,virtual/libgles2"
>> >> +PACKAGECONFIG[opengl] = "--enable-gl,--disable-gl,virtual/libgl"
>> >
>> > Since the opengl distro feature can imply either OpenGL or OpenGL ES
>> > support, it doesn't seem right to use it to select one over the other
>> > (ie for recipes which support both, shouldn't the choice between
>> > OpenGL or OpenGL ES be independent of the opengl distro feature) ?
>>
>> at some point we differentiated between opengl and gles at distro level
>> atleast for RDK, but I agree that marking opengl as a distro feature
>> encompassing all OpenGL implementations is better. Although, in this
>> particular case all openGL implementations can be enabled simultaneously
>> so may be we can enable egl and gles too with same knob. Alternatively
>> We can leave the packageconfig knob disabled which will make it same
>> defaults effectively ( which is disabled)
>>
>> >
>> >>
>> >>  #check for TARGET_FPU=soft and inform configure of the result so it
>> >> can disable some floating points
>> >>  require cairo-fpu.inc
>> >> --
>> >> 2.14.0
>> >>
>> >> --
>> >> ___
>> >> Openembedded-core mailing list
>> >> Openembedded-core@lists.openembedded.org
>> >> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>>
>>
>>
>> --
>> ___
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>>
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 4/4] cairo: Add pkgconfig for opengl support

2017-08-09 Thread Burton, Ross
Breaks the no-x11 builder:
https://autobuilder.yoctoproject.org/main/builders/nightly-no-x11/builds/543/steps/BuildImages/logs/stdio

Ross

On 9 August 2017 at 19:11, Khem Raj  wrote:

> On 8/9/17 8:41 AM, Andre McCurdy wrote:
> > On Wed, Aug 9, 2017 at 7:19 AM, Khem Raj  wrote:
> >> Signed-off-by: Khem Raj 
> >
> > Any explanation? Was this previously non-deterministic? If so, how far
> > back does the problem go?
>
> it isnt non-deterministic atleast not after RSS. However, we need this
> enabled when we have openGL/X11 enabled.
>
> >
> >> ---
> >>  meta/recipes-graphics/cairo/cairo.inc | 4 +++-
> >>  1 file changed, 3 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/meta/recipes-graphics/cairo/cairo.inc
> b/meta/recipes-graphics/cairo/cairo.inc
> >> index 8e1e2e1b88..fd376951bd 100644
> >> --- a/meta/recipes-graphics/cairo/cairo.inc
> >> +++ b/meta/recipes-graphics/cairo/cairo.inc
> >> @@ -22,7 +22,8 @@ X11DEPENDS = "virtual/libx11 libsm libxrender libxext"
> >>  DEPENDS = "libpng fontconfig pixman glib-2.0 zlib"
> >>
> >>  PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11',
> 'x11 xcb', '', d)} \
> >> -   ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)}"
> >> +   ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)} \
> >> +   ${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"
> >>
> >>  PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no
> --disable-xlib,${X11DEPENDS}"
> >>  PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"
> >> @@ -30,6 +31,7 @@ PACKAGECONFIG[directfb] = "--enable-directfb=yes,,
> directfb"
> >>  PACKAGECONFIG[valgrind] = "--enable-valgrind=yes,--
> disable-valgrind,valgrind"
> >>  PACKAGECONFIG[egl] = "--enable-egl=yes,--disable-egl,virtual/egl"
> >>  PACKAGECONFIG[glesv2] = "--enable-glesv2,--disable-
> glesv2,virtual/libgles2"
> >> +PACKAGECONFIG[opengl] = "--enable-gl,--disable-gl,virtual/libgl"
> >
> > Since the opengl distro feature can imply either OpenGL or OpenGL ES
> > support, it doesn't seem right to use it to select one over the other
> > (ie for recipes which support both, shouldn't the choice between
> > OpenGL or OpenGL ES be independent of the opengl distro feature) ?
>
> at some point we differentiated between opengl and gles at distro level
> atleast for RDK, but I agree that marking opengl as a distro feature
> encompassing all OpenGL implementations is better. Although, in this
> particular case all openGL implementations can be enabled simultaneously
> so may be we can enable egl and gles too with same knob. Alternatively
> We can leave the packageconfig knob disabled which will make it same
> defaults effectively ( which is disabled)
>
> >
> >>
> >>  #check for TARGET_FPU=soft and inform configure of the result so it
> can disable some floating points
> >>  require cairo-fpu.inc
> >> --
> >> 2.14.0
> >>
> >> --
> >> ___
> >> Openembedded-core mailing list
> >> Openembedded-core@lists.openembedded.org
> >> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>
>
> --
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 4/4] cairo: Add pkgconfig for opengl support

2017-08-09 Thread Khem Raj
On 8/9/17 8:41 AM, Andre McCurdy wrote:
> On Wed, Aug 9, 2017 at 7:19 AM, Khem Raj  wrote:
>> Signed-off-by: Khem Raj 
> 
> Any explanation? Was this previously non-deterministic? If so, how far
> back does the problem go?

it isnt non-deterministic atleast not after RSS. However, we need this
enabled when we have openGL/X11 enabled.

> 
>> ---
>>  meta/recipes-graphics/cairo/cairo.inc | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/meta/recipes-graphics/cairo/cairo.inc 
>> b/meta/recipes-graphics/cairo/cairo.inc
>> index 8e1e2e1b88..fd376951bd 100644
>> --- a/meta/recipes-graphics/cairo/cairo.inc
>> +++ b/meta/recipes-graphics/cairo/cairo.inc
>> @@ -22,7 +22,8 @@ X11DEPENDS = "virtual/libx11 libsm libxrender libxext"
>>  DEPENDS = "libpng fontconfig pixman glib-2.0 zlib"
>>
>>  PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 
>> xcb', '', d)} \
>> -   ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)}"
>> +   ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)} \
>> +   ${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"
>>
>>  PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no 
>> --disable-xlib,${X11DEPENDS}"
>>  PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"
>> @@ -30,6 +31,7 @@ PACKAGECONFIG[directfb] = "--enable-directfb=yes,,directfb"
>>  PACKAGECONFIG[valgrind] = 
>> "--enable-valgrind=yes,--disable-valgrind,valgrind"
>>  PACKAGECONFIG[egl] = "--enable-egl=yes,--disable-egl,virtual/egl"
>>  PACKAGECONFIG[glesv2] = "--enable-glesv2,--disable-glesv2,virtual/libgles2"
>> +PACKAGECONFIG[opengl] = "--enable-gl,--disable-gl,virtual/libgl"
> 
> Since the opengl distro feature can imply either OpenGL or OpenGL ES
> support, it doesn't seem right to use it to select one over the other
> (ie for recipes which support both, shouldn't the choice between
> OpenGL or OpenGL ES be independent of the opengl distro feature) ?

at some point we differentiated between opengl and gles at distro level
atleast for RDK, but I agree that marking opengl as a distro feature
encompassing all OpenGL implementations is better. Although, in this
particular case all openGL implementations can be enabled simultaneously
so may be we can enable egl and gles too with same knob. Alternatively
We can leave the packageconfig knob disabled which will make it same
defaults effectively ( which is disabled)

> 
>>
>>  #check for TARGET_FPU=soft and inform configure of the result so it can 
>> disable some floating points
>>  require cairo-fpu.inc
>> --
>> 2.14.0
>>
>> --
>> ___
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core




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


Re: [OE-core] [PATCH v3 07/11] image_types.bbclass: improve cpio image reproducibility

2017-08-09 Thread Andre McCurdy
On Wed, Aug 9, 2017 at 10:48 AM, Juro Bystricky
 wrote:
> This patch helps to build cpio images that are binary reproducible.
> The changes are as follows:
>
> 1. By default, cpio from the host is used, which can be quite old.
>Hence we need to implement a way to use/call cpio-native, which supports
>new features needed for binary reproducibility, notably the arguments
>such as "--reproducible" and "--ignore-devno".
>This can be achieved by specifying the following (in local.conf):

Is it useful to keep the option using cpio from the host? Why not
always use cpio-native?

>do_image_cpio[depends] += "cpio-replacement-native:do_populate_sysroot"
>EXTRANATIVEPATH += "cpio-native"
>
> 2. Provide a way to pass custom arguments to cpio. This is done via
>a new variable IMAGE_CMD_CPIO. For binary reproducible cpio archives
>one needs to set (in local.conf)
>
>IMAGE_CMD_CPIO = "cpio --ignore-devno --reproducible "
>
> 3. A symlink is created as part of the image. Here we make sure it gets the
>timestamps (mtime) based on the timestamp of the symlink target, rather 
> than
>the timestamp corresponding to the build time.
>
> Signed-off-by: Juro Bystricky 
> ---
>  meta/classes/image_types.bbclass | 14 --
>  1 file changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/meta/classes/image_types.bbclass 
> b/meta/classes/image_types.bbclass
> index e0368c7..50d0c07 100644
> --- a/meta/classes/image_types.bbclass
> +++ b/meta/classes/image_types.bbclass
> @@ -122,9 +122,17 @@ IMAGE_CMD_TAR ?= "tar"
>  # ignore return code 1 "file changed as we read it" as other tasks(e.g. 
> do_image_wic) may be hardlinking rootfs
>  IMAGE_CMD_tar = "${IMAGE_CMD_TAR} -cf 
> ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.tar -C ${IMAGE_ROOTFS} . || 
> [ $? -eq 1 ]"
>
> +# By default, cpio from the host is used, which can be quite old. If
> +# you need special parameters (like --ignore-devno --reproducible) which are 
> only
> +# supported by GNU cpio upstream >= 2.12, then override that default:
> +# IMAGE_CMD_CPIO = "cpio --ignore-devno"
> +# do_image_cpio[depends] += "cpio-replacement-native:do_populate_sysroot"
> +# EXTRANATIVEPATH += "cpio-native"
> +
> +IMAGE_CMD_CPIO ?= "cpio"
>  do_image_cpio[cleandirs] += "${WORKDIR}/cpio_append"
>  IMAGE_CMD_cpio () {
> -   (cd ${IMAGE_ROOTFS} && find . | cpio -o -H newc 
> >${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cpio)
> +   (cd ${IMAGE_ROOTFS} && find . | ${IMAGE_CMD_CPIO} -o -H newc -v 
> >${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cpio)
> # We only need the /init symlink if we're building the real
> # image. The -dbg image doesn't need it! By being clever
> # about this we also avoid 'touch' below failing, as it
> @@ -134,10 +142,12 @@ IMAGE_CMD_cpio () {
> if [ ! -L ${IMAGE_ROOTFS}/init ] && [ ! -e 
> ${IMAGE_ROOTFS}/init ]; then
> if [ -L ${IMAGE_ROOTFS}/sbin/init ] || [ -e 
> ${IMAGE_ROOTFS}/sbin/init ]; then
> ln -sf /sbin/init ${WORKDIR}/cpio_append/init
> +   # improve reproducibility: set the link mtime 
> to be the same as the target
> +   touch -h -r ${IMAGE_ROOTFS}/sbin/init 
> ${WORKDIR}/cpio_append/init
> else
> touch ${WORKDIR}/cpio_append/init
> fi
> -   (cd  ${WORKDIR}/cpio_append && echo ./init | cpio -oA 
> -H newc -F ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cpio)
> +   (cd  ${WORKDIR}/cpio_append && echo ./init | 
> ${IMAGE_CMD_CPIO} -oA -H newc -F 
> ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cpio)
> fi
> fi
>  }
> --
> 2.7.4
>
> --
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v3 09/11] python3: improve reproducibility

2017-08-09 Thread Juro Bystricky
The compiled .pyc files contain time stamp corresponding to the compile time.
This prevents binary reproducibility. This patch allows to achieve binary
reproducibility by overriding the build time stamp by the value
exported via SOURCE_DATE_EPOCH.

Patch by Bernhard M. Wiedemann.

[YOCTO#11241]

Signed-off-by: Juro Bystricky 
---
 .../python/python3-native_3.5.3.bb |  1 +
 .../support_SOURCE_DATE_EPOCH_in_py_compile.patch  | 97 ++
 meta/recipes-devtools/python/python3_3.5.3.bb  |  1 +
 3 files changed, 99 insertions(+)
 create mode 100644 
meta/recipes-devtools/python/python3/support_SOURCE_DATE_EPOCH_in_py_compile.patch

diff --git a/meta/recipes-devtools/python/python3-native_3.5.3.bb 
b/meta/recipes-devtools/python/python3-native_3.5.3.bb
index 250697f..3467d29 100644
--- a/meta/recipes-devtools/python/python3-native_3.5.3.bb
+++ b/meta/recipes-devtools/python/python3-native_3.5.3.bb
@@ -24,6 +24,7 @@ ${DISTRO_SRC_URI} \
 file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \
 file://setup.py-check-cross_compiling-when-get-FLAGS.patch \
 file://0001-Do-not-use-the-shell-version-of-python-config-that-w.patch \
+file://support_SOURCE_DATE_EPOCH_in_py_compile.patch \
 "
 
 SRC_URI[md5sum] = "57d1f8bfbabf4f2500273fb0706e6f21"
diff --git 
a/meta/recipes-devtools/python/python3/support_SOURCE_DATE_EPOCH_in_py_compile.patch
 
b/meta/recipes-devtools/python/python3/support_SOURCE_DATE_EPOCH_in_py_compile.patch
new file mode 100644
index 000..32ecab9
--- /dev/null
+++ 
b/meta/recipes-devtools/python/python3/support_SOURCE_DATE_EPOCH_in_py_compile.patch
@@ -0,0 +1,97 @@
+The compiled .pyc files contain time stamp corresponding to the compile time.
+This prevents binary reproducibility. This patch allows to achieve binary
+reproducibility by overriding the build time stamp by the value 
+exported via SOURCE_DATE_EPOCH. 
+
+Upstream-Status: Backport
+
+Signed-off-by: Juro Bystricky 
+
+
+From aeab488630fdb1b56a8d0b0c13fa88706b2afe9b Mon Sep 17 00:00:00 2001
+From: "Bernhard M. Wiedemann" 
+Date: Sat, 25 Feb 2017 06:42:28 +0100
+Subject: [PATCH] bpo-29708: support SOURCE_DATE_EPOCH env var in py_compile
+
+to allow for reproducible builds of python packages
+
+See https://reproducible-builds.org/ for why this is good
+and https://reproducible-builds.org/specs/source-date-epoch/
+for the definition of this variable.
+
+Background:
+In some distributions like openSUSE, binary rpms contain precompiled .pyc 
files.
+
+And packages like amqp or twisted dynamically generate .py files at build time
+so those have the current time and that timestamp gets embedded
+into the .pyc file header.
+When we then adapt file timestamps in rpms to be constant,
+the timestamp in the .pyc header will no more match
+the .py timestamp in the filesystem.
+The software will still work, but it will not use the .pyc file as it should.
+---
+ Doc/library/py_compile.rst  |  4 
+ Lib/py_compile.py   |  4 
+ Lib/test/test_py_compile.py | 19 +++
+ 3 files changed, 27 insertions(+)
+
+diff --git a/Doc/library/py_compile.rst b/Doc/library/py_compile.rst
+index 0af8fb1..841f3e8 100644
+--- a/Doc/library/py_compile.rst
 b/Doc/library/py_compile.rst
+@@ -53,6 +53,10 @@ byte-code cache files in the directory containing the 
source code.
+:func:`compile` function.  The default of ``-1`` selects the optimization
+level of the current interpreter.
+ 
++   If the SOURCE_DATE_EPOCH environment variable is set, the .py file mtime
++   and timestamp entry in .pyc file header, will be limited to this value.
++   See https://reproducible-builds.org/specs/source-date-epoch/ for more info.
++
+.. versionchanged:: 3.2
+   Changed default value of *cfile* to be :PEP:`3147`-compliant.  Previous
+   default was *file* + ``'c'`` (``'o'`` if optimization was enabled).
+diff --git a/Lib/py_compile.py b/Lib/py_compile.py
+index 11c5b50..62dcdc7 100644
+--- a/Lib/py_compile.py
 b/Lib/py_compile.py
+@@ -137,6 +137,10 @@ def compile(file, cfile=None, dfile=None, doraise=False, 
optimize=-1):
+ except FileExistsError:
+ pass
+ source_stats = loader.path_stats(file)
++sde = os.environ.get('SOURCE_DATE_EPOCH')
++if sde and source_stats['mtime'] > int(sde):
++source_stats['mtime'] = int(sde)
++os.utime(file, (source_stats['mtime'], source_stats['mtime']))
+ bytecode = importlib._bootstrap_external._code_to_bytecode(
+ code, source_stats['mtime'], source_stats['size'])
+ mode = importlib._bootstrap_external._calc_mode(file)
+diff --git a/Lib/test/test_py_compile.py b/Lib/test/test_py_compile.py
+index 4a6caa5..3d09963 100644
+--- a/Lib/test/test_py_compile.py
 b/Lib/test/test_py_compile.py
+@@ -98,6 +98,25 @@ def test_bad_coding(self):
+ self.assertFalse(os.path.exists(
+ importlib.util.cache_from_source(bad_coding)))
+ 
++

[OE-core] [PATCH v3 00/11] Reproducible binaries

2017-08-09 Thread Juro Bystricky
This patch-set contains basic changes needed in order to support building of
reproducible bianries. The set containes the following patches:

0001-reproducible_build.bbclass-initial-support-for-binar.patch
0002-image-prelink.bbclass-support-binary-reproducibility.patch
0003-rootfs-postcommands.bbclass-support-binary-reproduci.patch
0004-busybox.inc-improve-reproducibility.patch
0005-image.bbclass-support-binary-reproducibility.patch
0006-cpio-provide-cpio-replacement-native.patch
0007-image_types.bbclass-improve-cpio-image-reproducibili.patch
0008-python2.7-improve-reproducibility.patch
0009-python3-improve-reproducibility.patch
0010-kernel.bbclass-improve-reproducibility.patch
0011-poky-reproducible.conf-Initial-version.patch

Using this patch set while building core-image minimal (two clean builds, same
machine/OS, same date, two different folders, at two different times) I got the
following results:

Same:

core-image-minimal-initramfs-qemux86
bzImage-qemux86.bin
vmlinux.gz-qemux86.bin
(Some binaries i.e. ext4 differ, but the differnce is due to conversion to
.ext4)

Comparing Debian packages in tmp/deploy/deb:

Same:  4005
Different:  38
Total: 4043

(The remaining packages that still differ can be dealt with on an individual 
basis)


Although the patches contain commit messages explaining the purpose and 
implementation,
a somewhat more detailed description of selected patches seems prudent:

0001-reproducible_build.bbclass-initial-support-for-binar.patch
===

This patch creates a new class "reproducible_build.bbclass",
introducing two new variables:

BUILD_REPRODUCIBLE_BINARIES: "0" (default) business as usual, "1" turn on 
various pieces of
codes to improve reproducible builds

REPRODUCIBLE_TIMESTAMP_ROOTFS: only used if BUILD_REPRODUCIBLE_BINARIES="1".
Catch-all timestamp for various rootfs files, pre-linker, etc. If needed, 
timestamps can
be better granulated later on, right now we use a single value.

Having a new variable BUILD_REPRODUCIBLE_BINARIES serves two purposes:
1. Lets user decide (there are minor trade-offs)
2. Setting to "0" will guarantee to cause zero regressions.
3. Setting to "1" will force the the environment to contain SOURCE_DATE_EPOCH

BUILD_REPRODUCIBLE_BINARIES is globally exported, as this will initially force 
all kinds
of rebuilds. I know no simple way around this, though. This variable is needed 
in numerous
places: configuration, compilation, rootfs creation, packaging etc. 
REPRODUCIBLE_TIMESTAMP_ROOTFS does not need to be globally exported, it is 
exported locally
based on the need.
Once these variables are "official", various classes and recipes can be 
modified to conditionally
support binary reproducibility.

Setting SOURCE_DATE_EPOCH is essential for binary reproducibility.
We need to set a recipe specific SOURCE_DATE_EPOCH in each recipe environment 
for various tasks.
One way would be to modify all recipes one-by-one, but that is not realistic. 
So determining
SOURCE_DATE_EPOCH is done in this class automatically: After sources are 
unpacked (but
before they are patched), we try to determine the value for SOURCE_DATE_EPOCH.

There are 4 ways to determine SOURCE_DATE_EPOCH:
1. Use value from src-data-epoch.txt file if this file exists. This file was 
most likely created
  in the previous build by one of the following methods 2,3,4.
  (But it could be actually provided by a recipe via SRC_URI)

If the file does not exist:
2. Use .git last commit date timestamp (git does not allow checking out files 
and preserving their
   timestamps)
3. Use "known" files such as NEWS, CHANGLELOG, ...
4. Use the youngest file of the source tree.

Once the value of SOURCE_DATE_EPOCH is determined, it is stored in the recipe 
source tree in
a text file "src-date-epoch.txt'.

If this file is found by other recipe task, the value is placed in the 
SOURCE_DATE_EPOCH var in
the task environment. This is done in an anonymous python function, so 
SOURCE_DATE_EPOCH is
guaranteed to exist for all tasks. (If the file is not found SOURCE_DATE_EPOCH 
is set to 0)
This can optimized in the future, as some tasks (all tasks before fetch, tasks 
such as package QA,
rm_work, ...) do not need SOURCE_DATE_EPOCH in the environment.


0008-python2.7-improve-reproducibility.patch
0009-python3-improve-reproducibility.patch

These are back ports of existing patches. They ensure the compiled .pyc files
contain timestamp based on SOURCE_DATE_EPOCH (if defined in the environment).
(May not be needed in the future, my understanding is support for 
SOURCE_DATE_EPOCH is already
upstreamed in master)


0010-kernel.bbclass-improve-reproducibility.patch
=

This patch contains several changes, was created by squashing several commits.
Several tweaks to improve reproducibility:

We want to set KBUILD_BUILD_TIMESTAMP to some reproducible value. Normally,
we would 

[OE-core] [PATCH v3 11/11] poky-reproducible.conf: Initial version

2017-08-09 Thread Juro Bystricky
Simplify building reproducible images by using

DISTRO="poky-reproducible"

Sets some variables to reasonable values so users do not
have to set them in local.conf.

Signed-off-by: Juro Bystricky 
---
 meta-poky/conf/distro/include/reproducible-group  | 50 +++
 meta-poky/conf/distro/include/reproducible-passwd | 25 
 meta-poky/conf/distro/poky-reproducible.conf  | 38 +
 3 files changed, 113 insertions(+)
 create mode 100644 meta-poky/conf/distro/include/reproducible-group
 create mode 100644 meta-poky/conf/distro/include/reproducible-passwd
 create mode 100644 meta-poky/conf/distro/poky-reproducible.conf

diff --git a/meta-poky/conf/distro/include/reproducible-group 
b/meta-poky/conf/distro/include/reproducible-group
new file mode 100644
index 000..4213d4e
--- /dev/null
+++ b/meta-poky/conf/distro/include/reproducible-group
@@ -0,0 +1,50 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:
+adm:x:4:
+tty:x:5:
+disk:x:6:
+lp:x:7:
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+input:x:19:
+dialout:x:20:
+fax:x:21:
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:
+tape:x:26:
+sudo:x:27:
+audio:x:29:pulse
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+gnats:x:41:
+shadow:x:42:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+shutdown:x:70:
+users:x:100:
+crontab:x:993:
+sshd:x:994:
+avahi:x:995:
+rpcuser:x:996:
+rpc:x:997:
+messagebus:x:998:
+netdev:x:999:
+tracing:x:1000:
+pulse:x:1001:pulse
+nogroup:x:65534:
diff --git a/meta-poky/conf/distro/include/reproducible-passwd 
b/meta-poky/conf/distro/include/reproducible-passwd
new file mode 100644
index 000..876195e
--- /dev/null
+++ b/meta-poky/conf/distro/include/reproducible-passwd
@@ -0,0 +1,25 @@
+root:x:0:0:root:/home/root:/bin/sh
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+sys:x:3:3:sys:/dev:/bin/sh
+sync:x:4:65534:sync:/bin:/bin/sync
+games:x:5:60:games:/usr/games:/bin/sh
+man:x:6:12:man:/var/cache/man:/bin/sh
+lp:x:7:7:lp:/var/spool/lpd:/bin/sh
+mail:x:8:8:mail:/var/mail:/bin/sh
+news:x:9:9:news:/var/spool/news:/bin/sh
+uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+backup:x:34:34:backup:/var/backups:/bin/sh
+list:x:38:38:Mailing List Manager:/var/list:/bin/sh
+irc:x:39:39:ircd:/var/run/ircd:/bin/sh
+gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
+pulse:x:993:1001::/var/run/pulse:/bin/false
+distcc:x:994:65534::/dev/null:/bin/sh
+sshd:x:995:994::/var/run/sshd:/bin/false
+avahi:x:996:995::/var/run/avahi-daemon:/bin/false
+rpcuser:x:997:996::/var/lib/nfs:/bin/false
+rpc:x:998:997::/:/bin/false
+messagebus:x:999:998::/var/lib/dbus:/bin/false
+nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
diff --git a/meta-poky/conf/distro/poky-reproducible.conf 
b/meta-poky/conf/distro/poky-reproducible.conf
new file mode 100644
index 000..c94f673
--- /dev/null
+++ b/meta-poky/conf/distro/poky-reproducible.conf
@@ -0,0 +1,38 @@
+require conf/distro/poky.conf
+DISTRO = "poky-reproducible"
+
+BUILD_REPRODUCIBLE_BINARIES = "1"
+REPRODUCIBLE_TIMESTAMP_ROOTFS ?= "1483228802"
+LDCONFIGDEPEND = ""
+do_image_cpio[depends] += "cpio-replacement-native:do_populate_sysroot"
+EXTRANATIVEPATH += "cpio-native"
+IMAGE_CMD_CPIO = "cpio --ignore-devno --reproducible "
+
+IMAGE_CMD_TAR = "tar -v --sort=name "
+
+PACKAGE_CLASSES ="package_deb"
+
+# For reproducibility, we need to consistently assign the UID/GID values.
+# Use the static uid and gid mechanism from OE-core for that:
+# 
http://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#ref-classes-useradd
+#
+# Dynamically assigned IDs are detected and lead to an error during
+# the build.
+#
+# Developers who need to add new entries should add their own mapping
+# file to USERADD_UID_TABLES and/or USERADD_GID_TABLES, either in a
+# derived distro config or in their local.conf.
+#
+# It is also possible to disable the mechanism by modifying 
USERADD_ERROR_DYNAMIC:
+# "warn" merely prints a warning, empty value silently allows dynamic
+# ID allocation.
+#
+# The actual files for UID/GID values come from core-image-minimal-sdk
+# /etc/group
+# /etc/passwd
+
+USERADDEXTENSION = "useradd-staticids"
+USERADD_ERROR_DYNAMIC ??= "error"
+USERADD_UID_TABLES += "conf/distro/include/reproducible-passwd"
+USERADD_GID_TABLES += "conf/distro/include/reproducible-group"
+
-- 
2.7.4

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


[OE-core] [PATCH v3 10/11] kernel.bbclass: improve reproducibility

2017-08-09 Thread Juro Bystricky
Several tweaks to improve reproducibility:

1. If BUILD_REPRODUCIBLE_BINARIES == 1, set KBUILD_BUILD_TIMESTAMP
to a reproducible value. This is either a non-zero SOURCE_DATE_EPOCH, or the
value obtained from top entry of GIT repo, or (if there is no GIT repo)
fallback to REPRODUCIBLE_TIMESTAMP_ROOTFS as the last resort.
Also export KCONFIG_NOTIMESTAMP=1.

2. When compressing vmlinux.gz, use gzip "-n" option

3. Kernel and kernel modules contain hard coded paths referencing the host
build system. This is usually because the source code contains __FILE__
at some place. This prevents binary reproducibility. However, some compilers
allow remapping of the __FILE__ value. If we detect the compiler is capable
of doing this, we replace the source path $(S) part of __FILE__ by a string 
"/kernel-source".
For example:

​/data/master/build/tmp/work-shared/qemux86/kernel-source/drivers/media/v4l2-core/videobuf2-core.​c

will be replaced by a reproducible value:

/kernel-source/drivers/media/v4l2-core/videobuf2-core.c.

Signed-off-by: Juro Bystricky 
---
 meta/classes/kernel.bbclass | 39 ---
 1 file changed, 36 insertions(+), 3 deletions(-)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index ce2cab6..2a76554 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -255,8 +255,39 @@ python do_devshell_prepend () {
 
 addtask bundle_initramfs after do_install before do_deploy
 
+get_cc_option () {
+   # Check if KERNEL_CC supports the option "file-prefix-map".
+   # This option allows us to build images with __FILE__ values 
that do not
+   # contain the host build path.
+   cc_option_supported=`${KERNEL_CC} -Q --help=joined | grep 
ffile-prefix-map`
+   cc_extra=""
+   if [ $cc_option_supported = 

[OE-core] [PATCH v3 03/11] rootfs-postcommands.bbclass: support binary reproducibility

2017-08-09 Thread Juro Bystricky
Conditionally support binary reproducibility of rootfs images.
If BUILD_REPRODUCIBLE_BINARIES = 1 then:

1. set /etc/timestamp to a reproducible value
2. set /etc/version to a reproducible value
3. set /etc/gconf: set mtime in all %gconf.xml to reproducible values

The reproducible value is taken from the variable REPRODUCIBLE_TIMESTAMP_ROOTFS.
If the variable is not specified, the timestamp value is derived from
the top git commit.

[YOCTO#11176]

Signed-off-by: Juro Bystricky 
---
 meta/classes/rootfs-postcommands.bbclass | 27 ---
 1 file changed, 24 insertions(+), 3 deletions(-)

diff --git a/meta/classes/rootfs-postcommands.bbclass 
b/meta/classes/rootfs-postcommands.bbclass
index 78f7c55..46cb530 100644
--- a/meta/classes/rootfs-postcommands.bbclass
+++ b/meta/classes/rootfs-postcommands.bbclass
@@ -48,6 +48,7 @@ ROOTFS_POSTPROCESS_COMMAND_append_qemuall = 
"${SSH_DISABLE_DNS_LOOKUP}"
 SORT_PASSWD_POSTPROCESS_COMMAND ??= " sort_passwd; "
 python () {
 d.appendVar('ROOTFS_POSTPROCESS_COMMAND', 
'${SORT_PASSWD_POSTPROCESS_COMMAND}')
+d.appendVar('ROOTFS_POSTPROCESS_COMMAND', 'rootfs_reproducible;')
 }
 
 systemd_create_users () {
@@ -245,10 +246,12 @@ python write_image_manifest () {
 os.symlink(os.path.basename(manifest_name), manifest_link)
 }
 
-# Can be use to create /etc/timestamp during image construction to give a 
reasonably
+# Can be used to create /etc/timestamp during image construction to give a 
reasonably
 # sane default time setting
 rootfs_update_timestamp () {
-   date -u +%4Y%2m%2d%2H%2M%2S >${IMAGE_ROOTFS}/etc/timestamp
+   if [ "$BUILD_REPRODUCIBLE_BINARIES" = "0" ]; then
+   date -u +%4Y%2m%2d%2H%2M%2S >${IMAGE_ROOTFS}/etc/timestamp
+   fi
 }
 
 # Prevent X from being started
@@ -288,7 +291,6 @@ rootfs_sysroot_relativelinks () {
sysroot-relativelinks.py ${SDK_OUTPUT}/${SDKTARGETSYSROOT}
 }
 
-
 # Generated test data json file
 python write_image_test_data() {
 from oe.data import export2json
@@ -304,3 +306,22 @@ python write_image_test_data() {
os.remove(testdata_link)
 os.symlink(os.path.basename(testdata), testdata_link)
 }
+
+# Perform any additional adjustments needed to make rootf binary reproducible
+rootfs_reproducible () {
+   if [ "$BUILD_REPRODUCIBLE_BINARIES" = "1" ]; then
+   if [ "$REPRODUCIBLE_TIMESTAMP_ROOTFS" = "" ]; then
+   REPRODUCIBLE_TIMESTAMP_ROOTFS=`git log -1 --pretty=%ct`
+   fi
+
+   # Convert UTC into %4Y%2m%2d%2H%2M%2S
+   sformatted=`date -u -d @$REPRODUCIBLE_TIMESTAMP_ROOTFS 
+%4Y%2m%2d%2H%2M%2S`
+   echo $sformatted > ${IMAGE_ROOTFS}/etc/version
+   bbnote "rootfs_reproducible: set /etc/version to $sformatted"
+   echo $sformatted > ${IMAGE_ROOTFS}/etc/timestamp
+   bbnote "rootfs_reproducible: set /etc/timestamp to $sformatted"
+
+   find ${IMAGE_ROOTFS}/etc/gconf -name '%gconf.xml' -print0 | 
xargs -0r \
+   sed -i -e 
's@\bmtime="[0-9][0-9]*"@mtime="'$REPRODUCIBLE_TIMESTAMP_ROOTFS'"@g'
+   fi
+}
-- 
2.7.4

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


[OE-core] [PATCH v3 04/11] busybox.inc: improve reproducibility

2017-08-09 Thread Juro Bystricky
For reproducible builds do not generate build timestamp as part of
the version string.

Remove host tools references from .config file.
With this patch all eight busybox packages are built as
binary reproducible.

Signed-off-by: Juro Bystricky 
---
 meta/recipes-core/busybox/busybox.inc | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/meta/recipes-core/busybox/busybox.inc 
b/meta/recipes-core/busybox/busybox.inc
index b8edd39..735b1f6 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -102,6 +102,9 @@ python () {
 }
 
 do_prepare_config () {
+   if [ "$BUILD_REPRODUCIBLE_BINARIES" = "1" ]; then
+   export KCONFIG_NOTIMESTAMP=1
+   fi
sed -e '/CONFIG_STATIC/d' \
< ${WORKDIR}/defconfig > ${S}/.config
echo "# CONFIG_STATIC is not set" >> .config
@@ -118,6 +121,7 @@ do_prepare_config () {
  ${S}/.config.oe-tmp > ${S}/.config
fi
sed -i 's/CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R 
-n"/CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -b"/' ${S}/.config
+   sed -i 's|${DEBUG_PREFIX_MAP}||g' ${S}/.config
 }
 
 # returns all the elements from the src uri that are .cfg files
@@ -138,6 +142,9 @@ do_configure () {
 
 do_compile() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+   if [ "$BUILD_REPRODUCIBLE_BINARIES" = "1" ]; then
+   export KCONFIG_NOTIMESTAMP=1
+   fi
if [ "${BUSYBOX_SPLIT_SUID}" = "1" -a x`grep 
"CONFIG_FEATURE_INDIVIDUAL=y" .config` = x ]; then
# split the .config into two parts, and make two busybox binaries
if [ -e .config.orig ]; then
-- 
2.7.4

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


[OE-core] [PATCH v3 06/11] cpio: provide cpio-replacement-native

2017-08-09 Thread Juro Bystricky
By default, bitbake uses host cpio, which can be quite old
and missing crucial newever features.
This patch allows to use the cpio-native instead, which is the
latest upstream version. To use the cpio-native instead of the
cpio from host, you need to specify:

IMAGE_DEPENDS_cpio_append = " cpio-replacement-native"
EXTRANATIVEPATH += "cpio-native"

Signed-off-by: Juro Bystricky 
---
 meta/recipes-extended/cpio/cpio_v2.inc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-extended/cpio/cpio_v2.inc 
b/meta/recipes-extended/cpio/cpio_v2.inc
index 31adb71..b2a0d1b 100644
--- a/meta/recipes-extended/cpio/cpio_v2.inc
+++ b/meta/recipes-extended/cpio/cpio_v2.inc
@@ -6,6 +6,8 @@ SECTION = "base"
 
 DEPENDS = "texinfo-native"
 
+PROVIDES_append_class-native = " cpio-replacement-native"
+
 SRC_URI = "${GNU_MIRROR}/cpio/cpio-${PV}.tar.gz \
 "
 
-- 
2.7.4

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


[OE-core] [PATCH v3 08/11] python2.7: improve reproducibility

2017-08-09 Thread Juro Bystricky
The compiled .pyc files contain time stamp corresponding to the compile time.
This prevents binary reproducibility. This patch allows to achieve binary
reproducibility by overriding the build time stamp by the value
exported via SOURCE_DATE_EPOCH.

Patch by Bernhard M. Wiedemann, backported from 
https://github.com/python/cpython/pull/296

[YOCTO#11241]

Signed-off-by: Juro Bystricky 
---
 .../python/python-native_2.7.13.bb |  1 +
 .../python/python/reproducible.patch   | 34 ++
 meta/recipes-devtools/python/python_2.7.13.bb  |  1 +
 3 files changed, 36 insertions(+)
 create mode 100644 meta/recipes-devtools/python/python/reproducible.patch

diff --git a/meta/recipes-devtools/python/python-native_2.7.13.bb 
b/meta/recipes-devtools/python/python-native_2.7.13.bb
index 7edf153..a82b7bb 100644
--- a/meta/recipes-devtools/python/python-native_2.7.13.bb
+++ b/meta/recipes-devtools/python/python-native_2.7.13.bb
@@ -17,6 +17,7 @@ SRC_URI += "\
 file://builddir.patch \
 file://parallel-makeinst-create-bindir.patch \
 file://revert_use_of_sysconfigdata.patch \
+file://reproducible.patch \
"
 
 S = "${WORKDIR}/Python-${PV}"
diff --git a/meta/recipes-devtools/python/python/reproducible.patch 
b/meta/recipes-devtools/python/python/reproducible.patch
new file mode 100644
index 000..1265179
--- /dev/null
+++ b/meta/recipes-devtools/python/python/reproducible.patch
@@ -0,0 +1,34 @@
+The compiled .pyc files contain time stamp corresponding to the compile time.
+This prevents binary reproducibility. This patch allows to achieve binary
+reproducibility by overriding the build time stamp by the value 
+exported via SOURCE_DATE_EPOCH. 
+
+Patch by Bernhard M. Wiedemann
+
+Upstream-Status: Backport
+
+Signed-off-by: Juro Bystricky 
+
+Fri Feb 24 17:08:25 UTC 2017 - bwiedem...@suse.com
+
+- Add reproducible.patch to allow reproducible builds of various
+  python packages like python-amqp
+  Upstream: https://github.com/python/cpython/pull/296
+
+
+@@ -0,0 +1,15 @@
+Index: Python-2.7.13/Lib/py_compile.py
+===
+--- Python-2.7.13.orig/Lib/py_compile.py
 Python-2.7.13/Lib/py_compile.py
+@@ -108,6 +108,10 @@ def compile(file, cfile=None, dfile=None
+ timestamp = long(os.fstat(f.fileno()).st_mtime)
+ except AttributeError:
+ timestamp = long(os.stat(file).st_mtime)
++sde = os.environ.get('SOURCE_DATE_EPOCH')
++if sde and timestamp > int(sde):
++timestamp = int(sde)
++os.utime(file, (timestamp, timestamp))
+ codestring = f.read()
+ try:
+ codeobject = __builtin__.compile(codestring, dfile or file,'exec')
diff --git a/meta/recipes-devtools/python/python_2.7.13.bb 
b/meta/recipes-devtools/python/python_2.7.13.bb
index 4ef9952..96c3ab2 100644
--- a/meta/recipes-devtools/python/python_2.7.13.bb
+++ b/meta/recipes-devtools/python/python_2.7.13.bb
@@ -27,6 +27,7 @@ SRC_URI += "\
   file://use_sysroot_ncurses_instead_of_host.patch \
   file://add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \
   file://Don-t-use-getentropy-on-Linux.patch \
+  file://reproducible.patch \
 "
 
 S = "${WORKDIR}/Python-${PV}"
-- 
2.7.4

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


[OE-core] [PATCH v3 07/11] image_types.bbclass: improve cpio image reproducibility

2017-08-09 Thread Juro Bystricky
This patch helps to build cpio images that are binary reproducible.
The changes are as follows:

1. By default, cpio from the host is used, which can be quite old.
   Hence we need to implement a way to use/call cpio-native, which supports
   new features needed for binary reproducibility, notably the arguments
   such as "--reproducible" and "--ignore-devno".
   This can be achieved by specifying the following (in local.conf):

   do_image_cpio[depends] += "cpio-replacement-native:do_populate_sysroot"
   EXTRANATIVEPATH += "cpio-native"

2. Provide a way to pass custom arguments to cpio. This is done via
   a new variable IMAGE_CMD_CPIO. For binary reproducible cpio archives
   one needs to set (in local.conf)

   IMAGE_CMD_CPIO = "cpio --ignore-devno --reproducible "

3. A symlink is created as part of the image. Here we make sure it gets the
   timestamps (mtime) based on the timestamp of the symlink target, rather than
   the timestamp corresponding to the build time.

Signed-off-by: Juro Bystricky 
---
 meta/classes/image_types.bbclass | 14 --
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index e0368c7..50d0c07 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -122,9 +122,17 @@ IMAGE_CMD_TAR ?= "tar"
 # ignore return code 1 "file changed as we read it" as other tasks(e.g. 
do_image_wic) may be hardlinking rootfs
 IMAGE_CMD_tar = "${IMAGE_CMD_TAR} -cf 
${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.tar -C ${IMAGE_ROOTFS} . || [ 
$? -eq 1 ]"
 
+# By default, cpio from the host is used, which can be quite old. If
+# you need special parameters (like --ignore-devno --reproducible) which are 
only
+# supported by GNU cpio upstream >= 2.12, then override that default:
+# IMAGE_CMD_CPIO = "cpio --ignore-devno"
+# do_image_cpio[depends] += "cpio-replacement-native:do_populate_sysroot"
+# EXTRANATIVEPATH += "cpio-native"
+
+IMAGE_CMD_CPIO ?= "cpio"
 do_image_cpio[cleandirs] += "${WORKDIR}/cpio_append"
 IMAGE_CMD_cpio () {
-   (cd ${IMAGE_ROOTFS} && find . | cpio -o -H newc 
>${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cpio)
+   (cd ${IMAGE_ROOTFS} && find . | ${IMAGE_CMD_CPIO} -o -H newc -v 
>${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cpio)
# We only need the /init symlink if we're building the real
# image. The -dbg image doesn't need it! By being clever
# about this we also avoid 'touch' below failing, as it
@@ -134,10 +142,12 @@ IMAGE_CMD_cpio () {
if [ ! -L ${IMAGE_ROOTFS}/init ] && [ ! -e ${IMAGE_ROOTFS}/init 
]; then
if [ -L ${IMAGE_ROOTFS}/sbin/init ] || [ -e 
${IMAGE_ROOTFS}/sbin/init ]; then
ln -sf /sbin/init ${WORKDIR}/cpio_append/init
+   # improve reproducibility: set the link mtime 
to be the same as the target
+   touch -h -r ${IMAGE_ROOTFS}/sbin/init 
${WORKDIR}/cpio_append/init
else
touch ${WORKDIR}/cpio_append/init
fi
-   (cd  ${WORKDIR}/cpio_append && echo ./init | cpio -oA 
-H newc -F ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cpio)
+   (cd  ${WORKDIR}/cpio_append && echo ./init | 
${IMAGE_CMD_CPIO} -oA -H newc -F 
${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cpio)
fi
fi
 }
-- 
2.7.4

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


[OE-core] [PATCH v3 05/11] image.bbclass: support binary reproducibility

2017-08-09 Thread Juro Bystricky
Added a new task "reproducible_final_image_task".
If binary reproducibility is desired ($BUILD_REPRODUCIBLE_BINARIES" = "1"),
then recursivley modify mtimes of all files to a reproducible vale.
The value is obtained via REPRODUCIBLE_TIMESTAMP_ROOTFS.
This task is executed as the very last step in image creation, once all
the files in the image have been finalized.

[YOCTO#11176]

Signed-off-by: Juro Bystricky 
---
 meta/classes/image.bbclass | 16 +++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 2c1dc81..92f4714 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -117,7 +117,7 @@ def rootfs_variables(d):
  
'IMAGE_ROOTFS_MAXSIZE','IMAGE_NAME','IMAGE_LINK_NAME','IMAGE_MANIFEST','DEPLOY_DIR_IMAGE','IMAGE_FSTYPES','IMAGE_INSTALL_COMPLEMENTARY','IMAGE_LINGUAS',
  
'MULTILIBRE_ALLOW_REP','MULTILIB_TEMP_ROOTFS','MULTILIB_VARIANTS','MULTILIBS','ALL_MULTILIB_PACKAGE_ARCHS','MULTILIB_GLOBAL_VARIANTS','BAD_RECOMMENDATIONS','NO_RECOMMENDATIONS',
  
'PACKAGE_ARCHS','PACKAGE_CLASSES','TARGET_VENDOR','TARGET_ARCH','TARGET_OS','OVERRIDES','BBEXTENDVARIANT','FEED_DEPLOYDIR_BASE_URI','INTERCEPT_DIR','USE_DEVFS',
- 'CONVERSIONTYPES', 'IMAGE_GEN_DEBUGFS', 'ROOTFS_RO_UNNEEDED', 
'IMGDEPLOYDIR', 'PACKAGE_EXCLUDE_COMPLEMENTARY']
+ 'CONVERSIONTYPES', 'IMAGE_GEN_DEBUGFS', 'ROOTFS_RO_UNNEEDED', 
'IMGDEPLOYDIR', 'PACKAGE_EXCLUDE_COMPLEMENTARY', 
'REPRODUCIBLE_TIMESTAMP_ROOTFS']
 variables.extend(rootfs_command_variables(d))
 variables.extend(variable_depends(d))
 return " ".join(variables)
@@ -254,6 +254,7 @@ fakeroot python do_rootfs () {
 progress_reporter.next_stage()
 
 # generate rootfs
+d.setVarFlag('REPRODUCIBLE_TIMESTAMP_ROOTFS', 'export', '1')
 create_rootfs(d, progress_reporter=progress_reporter, 
logcatcher=logcatcher)
 
 progress_reporter.finish()
@@ -266,6 +267,7 @@ addtask rootfs after do_prepare_recipe_sysroot
 fakeroot python do_image () {
 from oe.utils import execute_pre_post_process
 
+d.setVarFlag('REPRODUCIBLE_TIMESTAMP_ROOTFS', 'export', '1')
 pre_process_cmds = d.getVar("IMAGE_PREPROCESS_COMMAND")
 
 execute_pre_post_process(d, pre_process_cmds)
@@ -650,3 +652,15 @@ create_merged_usr_symlinks_sdk() {
 
 ROOTFS_PREPROCESS_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 
'usrmerge', 'create_merged_usr_symlinks_rootfs; ', '',d)}"
 POPULATE_SDK_PRE_TARGET_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 
'usrmerge', 'create_merged_usr_symlinks_sdk; ', '',d)}"
+
+reproducible_final_image_task () {
+if [ "$BUILD_REPRODUCIBLE_BINARIES" = "1" ]; then
+if [ "$REPRODUCIBLE_TIMESTAMP_ROOTFS" = "" ]; then
+REPRODUCIBLE_TIMESTAMP_ROOTFS=`git log -1 --pretty=%ct`
+fi
+# Set mtime of all files to a reproducible value
+bbnote "reproducible_final_image_task: mtime set to 
$REPRODUCIBLE_TIMESTAMP_ROOTFS"
+find  ${IMAGE_ROOTFS} -exec touch -h  
--date=@$REPRODUCIBLE_TIMESTAMP_ROOTFS {} \;
+fi
+}
+IMAGE_PREPROCESS_COMMAND_append = " reproducible_final_image_task; "
-- 
2.7.4

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


[OE-core] [PATCH v3 01/11] reproducible_build.bbclass: initial support for binary reproducibility

2017-08-09 Thread Juro Bystricky
Conditionally set some environment variables in order to achieve
improved binary reproducibility. Providing BUILD_REPRODUCIBLE_BINARIES is
set to "1", we set the following environment variables:

export PYTHONHASHSEED=0
export PERL_HASH_SEED=0
export TZ="UTC"

Additionally, we export and set SOURCE_DATE_EPOCH. This is the most crucial 
step to
achieve binary reproducibility. The value for this variable (timestamp) is
obtained after source code for a recipe has been unpacked, but before it is 
patched.
If the code sources come from a GIT repo, we get the timestamp from the top
commit. (GIT repo does not preserve file mktime timestamps). It is not safe to 
assume
folders named "git" contain git repositories, so we check for presence of .git 
folder in ${S}.
Otherwise, if GIT repo is not present, we get mtime from known files suche as 
NEWS,
ChangeLog, etc. If this fails, we go through all files and get the timestamp
from the youngest one. We create an individual timestamp for each recipe.
The timestamp is stored in the file 'src_date_epoch.txt'. Later on, each task
reads this file and sets SOURCE_DATE_EPOCH based on the value found in the file.

The file src_date_epoch.txt file is re-used if found. This can be the file
we previously created ourselves, or it can be a file provided by a user via
a recipe.

[YOCTO#11178]
[YOCTO#11179]

Signed-off-by: Juro Bystricky 
---
 meta/classes/base.bbclass   |   4 ++
 meta/classes/reproducible_build.bbclass | 108 
 2 files changed, 112 insertions(+)
 create mode 100644 meta/classes/reproducible_build.bbclass

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 8c86977..bf79eb9 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -9,6 +9,7 @@ inherit utils
 inherit utility-tasks
 inherit metadata_scm
 inherit logging
+inherit reproducible_build
 
 OE_IMPORTS += "os sys time oe.path oe.utils oe.types oe.package 
oe.packagegroup oe.sstatesig oe.lsb oe.cachedpath oe.license"
 OE_IMPORTS[type] = "list"
@@ -166,6 +167,7 @@ python base_do_unpack() {
 try:
 fetcher = bb.fetch2.Fetch(src_uri, d)
 fetcher.unpack(d.getVar('WORKDIR'))
+create_src_date_epoch_stamp(d)
 except bb.fetch2.BBFetchException as e:
 bb.fatal(str(e))
 }
@@ -386,6 +388,7 @@ def set_packagetriplet(d):
 
 settriplet(d, "PKGMLTRIPLETS", archs, tos, tvs)
 
+
 python () {
 import string, re
 
@@ -685,6 +688,7 @@ python () {
 bb.warn("Recipe %s is marked as only being architecture specific 
but seems to have machine specific packages?! The recipe may as well mark 
itself as machine specific directly." % d.getVar("PN"))
 }
 
+
 addtask cleansstate after do_clean
 python do_cleansstate() {
 sstate_clean_cachefiles(d)
diff --git a/meta/classes/reproducible_build.bbclass 
b/meta/classes/reproducible_build.bbclass
new file mode 100644
index 000..af8db95
--- /dev/null
+++ b/meta/classes/reproducible_build.bbclass
@@ -0,0 +1,108 @@
+
+BUILD_REPRODUCIBLE_BINARIES ??= "0"
+BUILD_REPRODUCIBLE_BINARIES[export] = "1"
+
+# Unix timestamp
+REPRODUCIBLE_TIMESTAMP_ROOTFS ??= ""
+
+def get_src_date_epoch_quick(d, path):
+import subprocess
+src_date_epoch = 0
+saved_cwd = os.getcwd()
+os.chdir(path)
+if os.path.isdir(".git"):
+try:
+src_date_epoch = 
int(subprocess.check_output(['git','log','-1','--pretty=%ct']))
+except subprocess.CalledProcessError as grepexc:
+bb.warn("Not a git repository in .git folder? error:%d" % 
(grepexc.returncode))
+else:
+known_files = set(["NEWS", "ChangeLog", "Changelog", "CHANGES"])
+
+for file in known_files:
+if os.path.isfile(file):
+mtime = int(os.path.getmtime(file))
+
+# There may be more than one "known_file" present.
+# If so, use the youngest one
+if mtime > src_date_epoch:
+src_date_epoch = mtime
+
+os.chdir(saved_cwd)
+return src_date_epoch
+
+
+def create_src_date_epoch_stamp(d):
+if d.getVar('BUILD_REPRODUCIBLE_BINARIES') == '1':
+path = d.getVar('S')
+
+epochfile = os.path.join(path,'src_date_epoch.txt')
+if os.path.isfile(epochfile):
+bb.debug(1, " path: %s reusing src_date_epoch.txt" % epochfile)
+return
+
+filename_dbg = None
+src_date_epoch = get_src_date_epoch_quick(d, path)
+
+if src_date_epoch == 0:
+exclude = set(["temp", "licenses", "patches", 
"recipe-sysroot-native", "recipe-sysroot", "pseudo"])
+for root, dirs, files in os.walk(path, topdown=True):
+files = [f for f in files if not f[0] == '.']
+dirs[:] = [d for d in dirs if d not in exclude]
+
+for fname in files:
+filename = os.path.join(root, fname)
+try:
+  

[OE-core] [PATCH v3 02/11] image-prelink.bbclass: support binary reproducibility

2017-08-09 Thread Juro Bystricky
Conditionally support binary reproducibility in built images.
If BUILD_REPRODUCIBLE_BINARIES = 1 then:

1. Do not randomize library addresses
2. Set/export PRELINK_TIMESTAMP to a reproducible value.
   If REPRODUCIBLE_TIMESTAMP_ROOTFS is specified, then the value will
   be used. Otherwise the timestamp will be derived from the top git commit.

Signed-off-by: Juro Bystricky 
---
 meta/classes/image-prelink.bbclass | 12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/meta/classes/image-prelink.bbclass 
b/meta/classes/image-prelink.bbclass
index 4157df0..e833d47 100644
--- a/meta/classes/image-prelink.bbclass
+++ b/meta/classes/image-prelink.bbclass
@@ -36,7 +36,17 @@ prelink_image () {
dynamic_loader=$(linuxloader)
 
# prelink!
-   ${STAGING_SBINDIR_NATIVE}/prelink --root ${IMAGE_ROOTFS} -amR -N -c 
${sysconfdir}/prelink.conf --dynamic-linker $dynamic_loader
+   if [ "$BUILD_REPRODUCIBLE_BINARIES" = "1" ]; then
+   bbnote " prelink: BUILD_REPRODUCIBLE_BINARIES..."
+   if [ "$REPRODUCIBLE_TIMESTAMP_ROOTFS" = "" ]; then
+   export PRELINK_TIMESTAMP=`git log -1 --pretty=%ct `
+   else
+   export PRELINK_TIMESTAMP=$REPRODUCIBLE_TIMESTAMP_ROOTFS
+   fi
+   ${STAGING_SBINDIR_NATIVE}/prelink --root ${IMAGE_ROOTFS} -am -N 
-c ${sysconfdir}/prelink.conf --dynamic-linker $dynamic_loader
+   else
+   ${STAGING_SBINDIR_NATIVE}/prelink --root ${IMAGE_ROOTFS} -amR 
-N -c ${sysconfdir}/prelink.conf --dynamic-linker $dynamic_loader
+   fi
 
# Remove the prelink.conf if we had to add it.
if [ "$dummy_prelink_conf" = "true" ]; then
-- 
2.7.4

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


[OE-core] [PATCH] rootfs-postcommands.bbclass: Filter out dangling symlinks in ssh_allow_empty_password()

2017-08-09 Thread Khem Raj
In images built with pam in DISTRO_FEATURES, we end up with dangling symlinks
if su is not packaged into image

$ ls 
/mnt/a/oe/build/tmp/work/raspberrypi3-bec-linux-gnueabi/core-image-minimal/1.0-r0/rootfs/etc/pam.d/su-l
 -l
lrwxrwxrwx 1 kraj users 2 Aug  9 07:56 
/mnt/a/oe/build/tmp/work/raspberrypi3-bec-linux-gnueabi/core-image-minimal/1.0-r0/rootfs/etc/pam.d/su-l
 -> su

This causes image do_rootfs to fail

| sed: can't read 
/mnt/a/oe/build/tmp/work/raspberrypi3-bec-linux-gnueabi/core-image-minimal/1.0-r0/rootfs/etc/pam.d/s
u-l: No such file or directory
| WARNING: 
/mnt/a/oe/build/tmp/work/raspberrypi3-bec-linux-gnueabi/core-image-minimal/1.0-r0/temp/run.ssh_allow_empty_
password.19238:1 exit 2 from 'sed -i 's/nullok_secure/nullok/' 
/mnt/a/oe/build/tmp/work/raspberrypi3-bec-linux-gnueabi
/core-image-minimal/1.0-r0/rootfs/etc/pam.d/*'

Therefore we need to filter out dangling symlinks before sed'ing
things out

Signed-off-by: Khem Raj 
---
 meta/classes/rootfs-postcommands.bbclass | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/classes/rootfs-postcommands.bbclass 
b/meta/classes/rootfs-postcommands.bbclass
index 78f7c55933..e26aa90d73 100644
--- a/meta/classes/rootfs-postcommands.bbclass
+++ b/meta/classes/rootfs-postcommands.bbclass
@@ -158,7 +158,10 @@ ssh_allow_empty_password () {
fi
 
if [ -d ${IMAGE_ROOTFS}${sysconfdir}/pam.d ] ; then
-   sed -i 's/nullok_secure/nullok/' 
${IMAGE_ROOTFS}${sysconfdir}/pam.d/*
+   for f in `find ${IMAGE_ROOTFS}${sysconfdir}/pam.d -type l -exec 
test -e {} \; -print`
+   do
+   sed -i 's/nullok_secure/nullok/' $f
+   done
fi
 }
 
-- 
2.14.0

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


Re: [OE-core] [PATCH 4/4] cairo: Add pkgconfig for opengl support

2017-08-09 Thread Andre McCurdy
On Wed, Aug 9, 2017 at 7:19 AM, Khem Raj  wrote:
> Signed-off-by: Khem Raj 

Any explanation? Was this previously non-deterministic? If so, how far
back does the problem go?

> ---
>  meta/recipes-graphics/cairo/cairo.inc | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-graphics/cairo/cairo.inc 
> b/meta/recipes-graphics/cairo/cairo.inc
> index 8e1e2e1b88..fd376951bd 100644
> --- a/meta/recipes-graphics/cairo/cairo.inc
> +++ b/meta/recipes-graphics/cairo/cairo.inc
> @@ -22,7 +22,8 @@ X11DEPENDS = "virtual/libx11 libsm libxrender libxext"
>  DEPENDS = "libpng fontconfig pixman glib-2.0 zlib"
>
>  PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', 
> '', d)} \
> -   ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)}"
> +   ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)} \
> +   ${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"
>
>  PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no 
> --disable-xlib,${X11DEPENDS}"
>  PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"
> @@ -30,6 +31,7 @@ PACKAGECONFIG[directfb] = "--enable-directfb=yes,,directfb"
>  PACKAGECONFIG[valgrind] = "--enable-valgrind=yes,--disable-valgrind,valgrind"
>  PACKAGECONFIG[egl] = "--enable-egl=yes,--disable-egl,virtual/egl"
>  PACKAGECONFIG[glesv2] = "--enable-glesv2,--disable-glesv2,virtual/libgles2"
> +PACKAGECONFIG[opengl] = "--enable-gl,--disable-gl,virtual/libgl"

Since the opengl distro feature can imply either OpenGL or OpenGL ES
support, it doesn't seem right to use it to select one over the other
(ie for recipes which support both, shouldn't the choice between
OpenGL or OpenGL ES be independent of the opengl distro feature) ?

>
>  #check for TARGET_FPU=soft and inform configure of the result so it can 
> disable some floating points
>  require cairo-fpu.inc
> --
> 2.14.0
>
> --
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [oe-core][PATCH 1/1] slang: fix terminfo related problems

2017-08-09 Thread Randy MacLeod

On 2017-08-01 03:36 PM, Joe Slater wrote:

Do not use the JD_TERMCAP macro since we cannot get the terminfo from
ncurses pkg-config variants, but fix the macro to not reference host
directories.  Also add src/test/Makefile.in so that we can use -ltermcap
if we want to.

Since the recipe DEPENDS on ncurses, we assume terminfo is there.

Signed-off-by: Joe Slater 


Not in master[-next] yet...

Robert is listed as the maintainer.
Robert, do you agree with this fix?

../Randy


---
  .../slang/slang/terminfo_fixes.patch   | 148 +
  meta/recipes-extended/slang/slang_2.3.1a.bb|   1 +
  2 files changed, 149 insertions(+)
  create mode 100644 meta/recipes-extended/slang/slang/terminfo_fixes.patch

diff --git a/meta/recipes-extended/slang/slang/terminfo_fixes.patch 
b/meta/recipes-extended/slang/slang/terminfo_fixes.patch
new file mode 100644
index 000..3e6d15a
--- /dev/null
+++ b/meta/recipes-extended/slang/slang/terminfo_fixes.patch
@@ -0,0 +1,148 @@
+Do not use the JD_TERMCAP macro since we cannot get the terminfo from
+ncurses pkg-config, but fix the macro to not reference host directories.
+Also add src/test/Makefile.in so that we can use -ltermcap if we want to.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joe Slater 
+
+
+--- a/autoconf/aclocal.m4
 b/autoconf/aclocal.m4
+@@ -506,14 +506,10 @@ then
+ else
+MISC_TERMINFO_DIRS=""
+ fi
+-JD_Terminfo_Dirs="$MISC_TERMINFO_DIRS \
+-  /usr/lib/terminfo \
+-  /usr/share/terminfo \
+-  /usr/share/lib/terminfo \
+-/usr/local/lib/terminfo"
++
+ TERMCAP=-ltermcap
+
+-for terminfo_dir in $JD_Terminfo_Dirs
++for terminfo_dir in $MISC_TERMINFO_DIRS
+ do
+if test -d $terminfo_dir
+then
+--- a/autoconf/configure.ac
 b/autoconf/configure.ac
+@@ -249,7 +249,14 @@ AC_CHECK_SIZEOF(size_t)
+ JD_CHECK_LONG_LONG
+ JD_LARGE_FILE_SUPPORT
+
+-JD_TERMCAP
++dnl Do not use JD_TERMCAP, since we cannot get terminfo from ncurses*-config 
anymore.
++dnl Set TERMCAP=-ltermcap and AC_DEFINE(USE_TERMCAP,1,[Define to use termcap])
++dnl to use libtermcap.
++TERMCAP=""
++MISC_TERMINFO_DIRS=""
++AC_SUBST(TERMCAP)dnl
++AC_SUBST(MISC_TERMINFO_DIRS)dnl
++
+ JD_GCC_WARNINGS
+
+ JD_SET_OBJ_SRC_DIR(src)
+@@ -364,7 +371,7 @@ AC_CONFIG_HEADER(src/sysconf.h:src/confi
+ dnl AC_CONFIG_SUBDIRS(demo)
+
+ AC_OUTPUT(Makefile:autoconf/Makefile.in \
+-  src/Makefile slsh/Makefile modules/Makefile demo/Makefile \
++  src/Makefile src/test/Makefile slsh/Makefile modules/Makefile demo/Makefile 
\
+   slang.pc:autoconf/slangpc.in \
+ )
+
+--- /dev/null
 b/src/test/Makefile.in
+@@ -0,0 +1,90 @@
++# -*- make -*-
++TEST_SCRIPTS_SLC = argv syntax scircuit eqs sscanf loops arith array strops \
++  bstring pack stdio assoc selfload struct nspace path ifeval anytype arrmult 
\
++  time utf8 except bugs list regexp method deref naninf overflow sort \
++  longlong signal dollar req docfun debug qualif compare break multline \
++  stack misc posixio posdir proc math
++
++TEST_SCRIPTS_NO_SLC = autoload nspace2 prep
++
++TEST_SCRIPTS = $(TEST_SCRIPTS_SLC) $(TEST_SCRIPTS_NO_SLC)
++
++TEST_PGM = sltest
++MEMCHECK = valgrind --tool=memcheck --leak-check=yes --leak-resolution=med 
--num-callers=20
++RUN_TEST_PGM = ./$(TEST_PGM)
++SLANGINC = ..
++SLANGLIB = ../$(ARCH)objs
++OTHER_LIBS = -lm @TERMCAP@
++OTHER_CFLAGS =
++
++runtests: $(TEST_PGM) cleantmp
++  @tests=""; \
++  for test in $(TEST_SCRIPTS); \
++  do \
++ tests="$$tests $$test.sl"; \
++  done; \
++  for test in $(TEST_SCRIPTS_SLC); \
++  do \
++ tests="$$tests $$test.slc"; \
++  done; \
++  MAKERUNNING=1 ./runtests.sh $$tests
++# @touch $(TEST_PGM).c
++
++update: $(TEST_PGM) cleantmp
++  @tests=""; \
++  for X in $(TEST_SCRIPTS); \
++  do \
++if [ ! -e lastrun/$$X.sl ] || [ $$X.sl -nt lastrun/$$X.sl ] ; \
++then \
++ tests="$$tests $$X.sl"; \
++fi \
++  done; \
++  for X in $(TEST_SCRIPTS_SLC); \
++  do \
++if [ ! -e lastrun/$$X.slc ] || [ $$X.sl -nt lastrun/$$X.slc ] ; \
++then \
++ tests="$$tests $$X.slc"; \
++fi \
++  done; \
++  if test -n "$$tests"; \
++  then \
++MAKERUNNING=1 ./runtests.sh $$tests; \
++  fi
++# @touch $(TEST_PGM).c
++
++memcheck_runtests: $(TEST_PGM) cleantmp
++  @echo ""
++  @echo "Running tests:"
++  @echo ""
++  -@for X in $(TEST_SCRIPTS); \
++  do \
++ $(MEMCHECK) --log-file=log.$${X} $(RUN_TEST_PGM) $$X.sl; \
++ grep ERROR log.$${X}; grep 'lost: [^0]' log.$${X}; \
++ $(MEMCHECK) --log-file=log.$${X}_u $(RUN_TEST_PGM) -utf8 $$X.sl; \
++ grep ERROR log.$${X}_u; grep 'lost: [^0]' log.$${X}_u; \
++  done
++# touch $(TEST_PGM).c
++
++memcheck_runtests_slc: $(TEST_PGM) cleantmp
++  @echo ""
++  @echo "Running tests:"
++  @echo ""
++ 

Re: [OE-core] [PATCH] gstreamer-plugins-bad: replace openssl dependency with nettle for hls plugin

2017-08-09 Thread Andre McCurdy
On Wed, Aug 9, 2017 at 4:16 AM, Alexander Kanavin
 wrote:
> It has not been ported to openssl 1.1 (and there's nothing in upstream git),
> but it's possible to use nettle or gcrypt intead.
>
> Also, provide a fallback option to use openssl 1.0 when necessary.
>
> Signed-off-by: Alexander Kanavin 
> ---
>  meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc 
> b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
> index e964fef3f20..dc47f581af1 100644
> --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
> +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
> @@ -40,9 +40,9 @@ PACKAGECONFIG[flite]   = 
> "--enable-flite,--disable-flite,flite-alsa"
>  PACKAGECONFIG[fluidsynth]  = 
> "--enable-fluidsynth,--disable-fluidsynth,fluidsynth"
>  PACKAGECONFIG[gles2]   = 
> "--enable-gles2,--disable-gles2,virtual/libgles2"
>  PACKAGECONFIG[gtk] = "--enable-gtk3,--disable-gtk3,gtk+3"
> -# ensure OpenSSL is used for HLS AES description instead of nettle
> -# (OpenSSL is a shared dependency with dtls)
> -PACKAGECONFIG[hls] = "--enable-hls 
> --with-hls-crypto=openssl,--disable-hls,openssl"
> +PACKAGECONFIG[hls] = "--enable-hls 
> --with-hls-crypto=nettle,--disable-hls,nettle"
> +# Provide a fallback to openssl 1.0 when using nettle is not acceptable or 
> desirable
> +PACKAGECONFIG[hls_openssl10]   = "--enable-hls 
> --with-hls-crypto=openssl,--disable-hls,openssl10"

The option which isn't enabled is going to cause "--disable-hls" to be
added to the configure command line, so this isn't going to work as
expected.

>  PACKAGECONFIG[kms] = "--enable-kms,--disable-kms,libdrm"
>  PACKAGECONFIG[libmms]  = "--enable-libmms,--disable-libmms,libmms"
>  PACKAGECONFIG[libssh2] = "--enable-libssh2,--disable-libssh2,libssh2"
> --
> 2.13.2
>
> --
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 4/4] cairo: Add pkgconfig for opengl support

2017-08-09 Thread Khem Raj
Signed-off-by: Khem Raj 
---
 meta/recipes-graphics/cairo/cairo.inc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/cairo/cairo.inc 
b/meta/recipes-graphics/cairo/cairo.inc
index 8e1e2e1b88..fd376951bd 100644
--- a/meta/recipes-graphics/cairo/cairo.inc
+++ b/meta/recipes-graphics/cairo/cairo.inc
@@ -22,7 +22,8 @@ X11DEPENDS = "virtual/libx11 libsm libxrender libxext"
 DEPENDS = "libpng fontconfig pixman glib-2.0 zlib"
 
 PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', 
'', d)} \
-   ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)}"
+   ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)} \
+   ${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"
 
 PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no 
--disable-xlib,${X11DEPENDS}"
 PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"
@@ -30,6 +31,7 @@ PACKAGECONFIG[directfb] = "--enable-directfb=yes,,directfb"
 PACKAGECONFIG[valgrind] = "--enable-valgrind=yes,--disable-valgrind,valgrind"
 PACKAGECONFIG[egl] = "--enable-egl=yes,--disable-egl,virtual/egl"
 PACKAGECONFIG[glesv2] = "--enable-glesv2,--disable-glesv2,virtual/libgles2"
+PACKAGECONFIG[opengl] = "--enable-gl,--disable-gl,virtual/libgl"
 
 #check for TARGET_FPU=soft and inform configure of the result so it can 
disable some floating points 
 require cairo-fpu.inc
-- 
2.14.0

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


[OE-core] [PATCH 3/4] python-numpy: Upgrade to 1.13.1

2017-08-09 Thread Khem Raj
Update LICENSE to BSD-3-Clause as per
https://github.com/numpy/numpy/blob/master/LICENSE.txt

LIC_FILES_CHKSUM changed due to copyright year change see
https://github.com/numpy/numpy/commit/b2ff4f13197dd58508d3d025a9034519974750bd

Signed-off-by: Khem Raj 
---
 ...h-usr-and-so-on-for-libraries-by-default-.patch | 24 +-
 ...thon-numpy_1.11.2.bb => python-numpy_1.13.1.bb} | 15 +++---
 ...on3-numpy_1.11.2.bb => python3-numpy_1.13.1.bb} | 14 ++---
 3 files changed, 25 insertions(+), 28 deletions(-)
 rename meta/recipes-devtools/python-numpy/{python-numpy_1.11.2.bb => 
python-numpy_1.13.1.bb} (86%)
 rename meta/recipes-devtools/python-numpy/{python3-numpy_1.11.2.bb => 
python3-numpy_1.13.1.bb} (87%)

diff --git 
a/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch
 
b/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch
index 5b134edf07..ffd6ced136 100644
--- 
a/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch
+++ 
b/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch
@@ -11,11 +11,11 @@ Signed-off-by: Alexander Kanavin 
  numpy/distutils/system_info.py | 50 +-
  1 file changed, 6 insertions(+), 44 deletions(-)
 
-diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py
-index 9dd48e2..80e197a 100644
 a/numpy/distutils/system_info.py
-+++ b/numpy/distutils/system_info.py
-@@ -204,51 +204,13 @@ if sys.platform == 'win32':
+Index: numpy-1.13.1/numpy/distutils/system_info.py
+===
+--- numpy-1.13.1.orig/numpy/distutils/system_info.py
 numpy-1.13.1/numpy/distutils/system_info.py
+@@ -211,51 +211,13 @@ if sys.platform == 'win32':
  default_x11_lib_dirs = []
  default_x11_include_dirs = []
  else:
@@ -29,7 +29,10 @@ index 9dd48e2..80e197a 100644
 -'/opt/local/include', '/sw/include',
 -'/usr/include/suitesparse']
 -default_src_dirs = ['.', '/usr/local/src', '/opt/src', '/sw/src']
--
++default_lib_dirs = libpaths(['/deadir/lib'], platform_bits)
++default_include_dirs = ['/deaddir/include']
++default_src_dirs = ['.', '/deaddir/src']
+ 
 -default_x11_lib_dirs = libpaths(['/usr/X11R6/lib', '/usr/X11/lib',
 - '/usr/lib'], platform_bits)
 -default_x11_include_dirs = ['/usr/X11R6/include', '/usr/X11/include',
@@ -50,7 +53,7 @@ index 9dd48e2..80e197a 100644
 -# tests are run in debug mode Python 3.
 -tmp = open(os.devnull, 'w')
 -p = sp.Popen(["gcc", "-print-multiarch"], stdout=sp.PIPE,
--stderr=tmp)
+- stderr=tmp)
 -except (OSError, DistutilsError):
 -# OSError if gcc is not installed, or SandboxViolation (DistutilsError
 -# subclass) if an old setuptools bug is triggered (see gh-3160).
@@ -64,15 +67,8 @@ index 9dd48e2..80e197a 100644
 -finally:
 -if tmp is not None:
 -tmp.close()
-+default_lib_dirs = libpaths(['/deadir/lib'], platform_bits)
-+default_include_dirs = ['/deaddir/include']
-+default_src_dirs = ['.', '/deaddir/src']
-+
 +default_x11_lib_dirs = libpaths(['/deaddir/lib'], platform_bits)
 +default_x11_include_dirs = ['/deaddir/include']
  
  if os.path.join(sys.prefix, 'lib') not in default_lib_dirs:
  default_lib_dirs.insert(0, os.path.join(sys.prefix, 'lib'))
--- 
-2.6.2
-
diff --git a/meta/recipes-devtools/python-numpy/python-numpy_1.11.2.bb 
b/meta/recipes-devtools/python-numpy/python-numpy_1.13.1.bb
similarity index 86%
rename from meta/recipes-devtools/python-numpy/python-numpy_1.11.2.bb
rename to meta/recipes-devtools/python-numpy/python-numpy_1.13.1.bb
index c4bc354036..63821d30fa 100644
--- a/meta/recipes-devtools/python-numpy/python-numpy_1.11.2.bb
+++ b/meta/recipes-devtools/python-numpy/python-numpy_1.13.1.bb
@@ -1,16 +1,20 @@
 SUMMARY = "A sophisticated Numeric Processing Package for Python"
 SECTION = "devel/python"
-LICENSE = "PSF"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=7e51a5677b22b865abbfb3dff6ffb2d0"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=1002b09cd654fcaa2dcc87535acd9a96"
 
 SRCNAME = "numpy"
 
-SRC_URI = 
"https://files.pythonhosted.org/packages/source/n/${SRCNAME}/${SRCNAME}-${PV}.tar.gz
 \
+SRC_URI = 
"https://github.com/${SRCNAME}/${SRCNAME}/releases/download/v${PV}/${SRCNAME}-${PV}.tar.gz
 \

file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \
file://remove-build-path-in-comments.patch \
file://fix_shebang_f2py.patch \
${CONFIGFILESURI} "
-UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/numpy/files/;
+

[OE-core] [PATCH 2/4] llvm: Keep llvm-native dependency with clang toolchain

2017-08-09 Thread Khem Raj
This was needed when we were conflicting with clang-native
but this is solved via append PN to binaries of llvm-native

Signed-off-by: Khem Raj 
---
 meta/recipes-devtools/llvm/llvm_git.bb | 2 --
 1 file changed, 2 deletions(-)

diff --git a/meta/recipes-devtools/llvm/llvm_git.bb 
b/meta/recipes-devtools/llvm/llvm_git.bb
index f36e6978ed..eb2049248e 100644
--- a/meta/recipes-devtools/llvm/llvm_git.bb
+++ b/meta/recipes-devtools/llvm/llvm_git.bb
@@ -10,8 +10,6 @@ LIC_FILES_CHKSUM = 
"file://LICENSE.TXT;md5=e825e017edc35cfd58e26116e5251771"
 
 DEPENDS = "libffi libxml2-native zlib ninja-native llvm-native"
 
-DEPENDS_remove_toolchain-clang = "llvm-native"
-
 RDEPENDS_${PN}_append_class-target = " ncurses-terminfo"
 
 inherit perlnative pythonnative cmake pkgconfig
-- 
2.14.0

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


[OE-core] [PATCH 1/4] musl: Drop the protected symbol optimization at configure time

2017-08-09 Thread Khem Raj
lld and gold can not handle it and treat it wrong

Fixes

[YOCTO #11689]

Signed-off-by: Khem Raj 
---
 meta/recipes-core/musl/musl_git.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-core/musl/musl_git.bb 
b/meta/recipes-core/musl/musl_git.bb
index 53a8ba196a..93e3535c8d 100644
--- a/meta/recipes-core/musl/musl_git.bb
+++ b/meta/recipes-core/musl/musl_git.bb
@@ -36,6 +36,7 @@ CONFIGUREOPTS = " \
 --libdir=${libdir} \
 --includedir=${includedir} \
 --syslibdir=${base_libdir} \
+--disable-visibility \
 "
 
 do_configure() {
-- 
2.14.0

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


[OE-core] [meta-qt5] Host paths show up in target qmake environment

2017-08-09 Thread Scott Ellis
This breaks qmake on target.

Same behavior in both pyro and master branches of meta-qt5.

This differs from earlier branches of meta-qt5, using earlier versions of Qt.

root@rpi3:~# qmake -query
QT_SYSROOT:/oe4/rpi/tmp-pyro/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/qtbase/5.8.0+gitAUTOINC+49dc9aa409-r0/recipe-sysroot
QT_INSTALL_PREFIX:/oe4/rpi/tmp-pyro/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/qtbase/5.8.0+gitAUTOINC+49dc9aa409-r0/recipe-sysroot/usr
QT_INSTALL_PREFIX/raw:/usr
QT_INSTALL_ARCHDATA:/oe4/rpi/tmp-pyro/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/qtbase/5.8.0+gitAUTOINC+49dc9aa409-r0/recipe-sysroot/usr/lib/qt5
QT_INSTALL_ARCHDATA/raw:/usr/lib/qt5
QT_INSTALL_DATA:/oe4/rpi/tmp-pyro/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/qtbase/5.8.0+gitAUTOINC+49dc9aa409-r0/recipe-sysroot/usr/share/qt5
QT_INSTALL_DATA/raw:/usr/share/qt5
QT_INSTALL_DOCS:/oe4/rpi/tmp-pyro/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/qtbase/5.8.0+gitAUTOINC+49dc9aa409-r0/recipe-sysroot/usr/share/doc/qt5
QT_INSTALL_DOCS/raw:/usr/share/doc/qt5
QT_INSTALL_HEADERS:/oe4/rpi/tmp-pyro/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/qtbase/5.8.0+gitAUTOINC+49dc9aa409-r0/recipe-sysroot/usr/include/qt5
QT_INSTALL_HEADERS/raw:/usr/include/qt5
QT_INSTALL_LIBS:/oe4/rpi/tmp-pyro/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/qtbase/5.8.0+gitAUTOINC+49dc9aa409-r0/recipe-sysroot/usr/lib
QT_INSTALL_LIBS/raw:/usr/lib
QT_INSTALL_LIBEXECS:/oe4/rpi/tmp-pyro/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/qtbase/5.8.0+gitAUTOINC+49dc9aa409-r0/recipe-sysroot/usr/lib/qt5/libexec
QT_INSTALL_LIBEXECS/raw:/usr/lib/qt5/libexec
QT_INSTALL_BINS:/oe4/rpi/tmp-pyro/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/qtbase/5.8.0+gitAUTOINC+49dc9aa409-r0/recipe-sysroot/usr/bin/qt5
QT_INSTALL_BINS/raw:/usr/bin/qt5
QT_INSTALL_TESTS:/oe4/rpi/tmp-pyro/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/qtbase/5.8.0+gitAUTOINC+49dc9aa409-r0/recipe-sysroot/usr/share/qt5/tests
QT_INSTALL_TESTS/raw:/usr/share/qt5/tests
QT_INSTALL_PLUGINS:/oe4/rpi/tmp-pyro/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/qtbase/5.8.0+gitAUTOINC+49dc9aa409-r0/recipe-sysroot/usr/lib/qt5/plugins
QT_INSTALL_PLUGINS/raw:/usr/lib/qt5/plugins
QT_INSTALL_IMPORTS:/oe4/rpi/tmp-pyro/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/qtbase/5.8.0+gitAUTOINC+49dc9aa409-r0/recipe-sysroot/usr/lib/qt5/imports
QT_INSTALL_IMPORTS/raw:/usr/lib/qt5/imports
QT_INSTALL_QML:/oe4/rpi/tmp-pyro/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/qtbase/5.8.0+gitAUTOINC+49dc9aa409-r0/recipe-sysroot/usr/lib/qt5/qml
QT_INSTALL_QML/raw:/usr/lib/qt5/qml
QT_INSTALL_TRANSLATIONS:/oe4/rpi/tmp-pyro/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/qtbase/5.8.0+gitAUTOINC+49dc9aa409-r0/recipe-sysroot/usr/share/qt5/translations
QT_INSTALL_TRANSLATIONS/raw:/usr/share/qt5/translations
QT_INSTALL_CONFIGURATION:/oe4/rpi/tmp-pyro/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/qtbase/5.8.0+gitAUTOINC+49dc9aa409-r0/recipe-sysroot/etc/qt5
QT_INSTALL_CONFIGURATION/raw:/etc/qt5
QT_INSTALL_EXAMPLES:/oe4/rpi/tmp-pyro/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/qtbase/5.8.0+gitAUTOINC+49dc9aa409-r0/recipe-sysroot/usr/share/qt5/examples
QT_INSTALL_EXAMPLES/raw:/usr/share/qt5/examples
QT_INSTALL_DEMOS:/oe4/rpi/tmp-pyro/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/qtbase/5.8.0+gitAUTOINC+49dc9aa409-r0/recipe-sysroot/usr/share/qt5/examples
QT_INSTALL_DEMOS/raw:/usr/share/qt5/examples
QT_HOST_PREFIX:/oe4/rpi/tmp-pyro/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/qtbase/5.8.0+gitAUTOINC+49dc9aa409-r0/recipe-sysroot-native
QT_HOST_DATA:/oe4/rpi/tmp-pyro/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/qtbase/5.8.0+gitAUTOINC+49dc9aa409-r0/recipe-sysroot/usr/lib/qt5
QT_HOST_BINS:/usr/bin/qt5
QT_HOST_LIBS:/oe4/rpi/tmp-pyro/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/qtbase/5.8.0+gitAUTOINC+49dc9aa409-r0/recipe-sysroot/usr/lib
QMAKE_SPEC:linux-oe-g++
QMAKE_XSPEC:linux-oe-g++
QMAKE_VERSION:3.1
QT_VERSION:5.8.0


The error you see on the target processing a simple Qt .pro file

root@rpi3:~/tspress# qmake
Could not find qmake configuration file linux-oe-g++.
Error processing project file: /home/root/tspress/tspress.pro


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


[OE-core] [PATCH] gstreamer-plugins-bad: replace openssl dependency with nettle for hls plugin

2017-08-09 Thread Alexander Kanavin
It has not been ported to openssl 1.1 (and there's nothing in upstream git),
but it's possible to use nettle or gcrypt intead.

Also, provide a fallback option to use openssl 1.0 when necessary.

Signed-off-by: Alexander Kanavin 
---
 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
index e964fef3f20..dc47f581af1 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
@@ -40,9 +40,9 @@ PACKAGECONFIG[flite]   = 
"--enable-flite,--disable-flite,flite-alsa"
 PACKAGECONFIG[fluidsynth]  = 
"--enable-fluidsynth,--disable-fluidsynth,fluidsynth"
 PACKAGECONFIG[gles2]   = 
"--enable-gles2,--disable-gles2,virtual/libgles2"
 PACKAGECONFIG[gtk] = "--enable-gtk3,--disable-gtk3,gtk+3"
-# ensure OpenSSL is used for HLS AES description instead of nettle
-# (OpenSSL is a shared dependency with dtls)
-PACKAGECONFIG[hls] = "--enable-hls 
--with-hls-crypto=openssl,--disable-hls,openssl"
+PACKAGECONFIG[hls] = "--enable-hls 
--with-hls-crypto=nettle,--disable-hls,nettle"
+# Provide a fallback to openssl 1.0 when using nettle is not acceptable or 
desirable
+PACKAGECONFIG[hls_openssl10]   = "--enable-hls 
--with-hls-crypto=openssl,--disable-hls,openssl10"
 PACKAGECONFIG[kms] = "--enable-kms,--disable-kms,libdrm"
 PACKAGECONFIG[libmms]  = "--enable-libmms,--disable-libmms,libmms"
 PACKAGECONFIG[libssh2] = "--enable-libssh2,--disable-libssh2,libssh2"
-- 
2.13.2

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


Re: [OE-core] [PATCH 4/4] gstreamer-plugins-bad: replace openssl dependency with nettle for hls plugin

2017-08-09 Thread Alexander Kanavin

On 08/08/2017 09:55 PM, Mark Hatle wrote:

For now I'm fine with 1.0 support.  So something like:

# ensure OpenSSL is used for HLS AES description instead of nettle
# (OpenSSL is a shared dependency with dtls)
PACKAGECONFIG[hls_openssl10] = "--enable-hls
--with-hls-crypto=openssl,--disable-hls,openssl10"

PACKAGECONFIG[hls] = "--enable-hls
--with-hls-crypto=nettle,--disable-hls,nettle"


Sure, I can amend the patch.


But my concern is changing the choice of encryption engine could break various
existing uses.  (Like I said, -I- don't have that use, but I expect others do..
perhaps not with gstreamer-plugins-bad though?)


You can say the same thing about almost anything that goes into master. 
In this case it doesn't matter, as there is a trivial way to revert the 
choice, but if the change was more involved, I would appreciate more 
specific evidence that this indeed causes real problems.


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


[OE-core] [PATCH] qemu: apic: fallthrough to PIC

2017-08-09 Thread zhe.he
From: He Zhe 

Backport a commit from qemu upstream to fix a protection fault

https://lists.gnu.org/archive/html/qemu-devel/2013-04/msg00878.html

Signed-off-by: He Zhe 
---
 .../qemu/qemu/apic-fixup-fallthrough-to-PIC.patch  | 46 ++
 meta/recipes-devtools/qemu/qemu_2.8.1.1.bb |  1 +
 2 files changed, 47 insertions(+)
 create mode 100644 
meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch

diff --git 
a/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch 
b/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch
new file mode 100644
index 00..9bbbc6f76d
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/apic-fixup-fallthrough-to-PIC.patch
@@ -0,0 +1,46 @@
+From bef93bb81588b5323a52d2e1886f2a77b64a976b Mon Sep 17 00:00:00 2001
+From: Mark Asselstine 
+Date: Tue, 26 Feb 2013 11:43:28 -0500
+Subject: [PATCH 03/18] apic: fixup fallthrough to PIC
+
+Commit 0e21e12bb311c4c1095d0269dc2ef81196ccb60a [Don't route PIC
+interrupts through the local APIC if the local APIC config says so.]
+missed a check to ensure the local APIC is enabled. Since if the local
+APIC is disabled it doesn't matter what the local APIC config says.
+
+If this check isn't done and the guest has disabled the local APIC the
+guest will receive a general protection fault, similar to what is seen
+here:
+
+https://lists.gnu.org/archive/html/qemu-devel/2012-12/msg02304.html
+
+The GPF is caused by an attempt to service interrupt 0x. This
+comes about since cpu_get_pic_interrupt() calls apic_accept_pic_intr()
+(with the local APIC disabled apic_get_interrupt() returns -1).
+apic_accept_pic_intr() returns 0 and thus the interrupt number which
+is returned from cpu_get_pic_interrupt(), and which is attempted to be
+serviced, is -1.
+
+Signed-off-by: Mark Asselstine 
+Upstream-Status: Submitted 
[https://lists.gnu.org/archive/html/qemu-devel/2013-04/msg00878.html]
+Signed-off-by: He Zhe 
+---
+ hw/intc/apic.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/hw/intc/apic.c b/hw/intc/apic.c
+index 45887d99..c5ae4087 100644
+--- a/hw/intc/apic.c
 b/hw/intc/apic.c
+@@ -587,7 +587,7 @@ int apic_accept_pic_intr(DeviceState *dev)
+ APICCommonState *s = APIC_COMMON(dev);
+ uint32_t lvt0;
+ 
+-if (!s)
++if (!s || !(s->spurious_vec & APIC_SV_ENABLE))
+ return -1;
+ 
+ lvt0 = s->lvt[APIC_LVT_LINT0];
+-- 
+2.11.0
+
diff --git a/meta/recipes-devtools/qemu/qemu_2.8.1.1.bb 
b/meta/recipes-devtools/qemu/qemu_2.8.1.1.bb
index a5dc70469d..a4ddb7f989 100644
--- a/meta/recipes-devtools/qemu/qemu_2.8.1.1.bb
+++ b/meta/recipes-devtools/qemu/qemu_2.8.1.1.bb
@@ -27,6 +27,7 @@ SRC_URI = 
"http://wiki.qemu-project.org/download/${BP}.tar.bz2 \
file://CVE-2016-9908.patch \
file://CVE-2016-9912.patch \
file://0001-replace-struct-ucontext-with-ucontext_t-type.patch \
+   file://apic-fixup-fallthrough-to-PIC.patch \
"
 
 SRC_URI_append_class-native = " \
-- 
2.11.0

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


Re: [OE-core] [PATCH 01/10] oeqa/targetcontrol.py: simplify checking for qemu_use_kvm

2017-08-09 Thread Robert Yang



On 08/08/2017 11:30 PM, Richard Purdie wrote:

On Mon, 2017-07-31 at 02:50 -0700, Robert Yang wrote:

The "if qemu_use_kvm" is not needed.

Signed-off-by: Robert Yang 
---
 meta/lib/oeqa/targetcontrol.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/meta/lib/oeqa/targetcontrol.py
b/meta/lib/oeqa/targetcontrol.py
index 3255e3a5c63..11e6c820e85 100644
--- a/meta/lib/oeqa/targetcontrol.py
+++ b/meta/lib/oeqa/targetcontrol.py
@@ -132,9 +132,8 @@ class QemuTarget(BaseTarget):
 dump_host_cmds = d.getVar("testimage_dump_host")
 dump_dir = d.getVar("TESTIMAGE_DUMP_DIR")
 qemu_use_kvm = d.getVar("QEMU_USE_KVM")
-if qemu_use_kvm and \
-   (qemu_use_kvm == "True" and "x86" in d.getVar("MACHINE") or \
-d.getVar("MACHINE") in qemu_use_kvm.split()):
+if qemu_use_kvm == "True" and "x86" in d.getVar("MACHINE") or \
+d.getVar("MACHINE") in qemu_use_kvm.split():
 use_kvm = True
 else:
 use_kvm = False



It is needed since qemu_use_kvm could be None and None.split() will
cause an error.


Thanks, I removed it from the repo:

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

// Robert



Cheers,

Richard


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


Re: [OE-core] [PATCH 01/10] oeqa/targetcontrol.py: simplify checking for qemu_use_kvm

2017-08-09 Thread Robert Yang



On 08/08/2017 11:30 PM, Richard Purdie wrote:

On Mon, 2017-07-31 at 02:50 -0700, Robert Yang wrote:

The "if qemu_use_kvm" is not needed.

Signed-off-by: Robert Yang 
---
 meta/lib/oeqa/targetcontrol.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/meta/lib/oeqa/targetcontrol.py
b/meta/lib/oeqa/targetcontrol.py
index 3255e3a5c63..11e6c820e85 100644
--- a/meta/lib/oeqa/targetcontrol.py
+++ b/meta/lib/oeqa/targetcontrol.py
@@ -132,9 +132,8 @@ class QemuTarget(BaseTarget):
 dump_host_cmds = d.getVar("testimage_dump_host")
 dump_dir = d.getVar("TESTIMAGE_DUMP_DIR")
 qemu_use_kvm = d.getVar("QEMU_USE_KVM")
-if qemu_use_kvm and \
-   (qemu_use_kvm == "True" and "x86" in d.getVar("MACHINE") or \
-d.getVar("MACHINE") in qemu_use_kvm.split()):
+if qemu_use_kvm == "True" and "x86" in d.getVar("MACHINE") or \
+d.getVar("MACHINE") in qemu_use_kvm.split():
 use_kvm = True
 else:
 use_kvm = False



It is needed since qemu_use_kvm could be None and None.split() will
cause an error.


Thanks, I removed from the repo:

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

// Robert



Cheers,

Richard


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


[OE-core] [PATCHv2] libinput: Upgrade 1.7.3 -> 1.8.1

2017-08-09 Thread Jussi Kukkonen
New feature release, see
https://lists.freedesktop.org/archives/wayland-devel/2017-June/034286.html
for the major features. This is the last major release to support
autotools.

Configure flag "--enable-event-gui" changed name.

Configure flags no longer default to "auto": explicitly disable the
things that were previously automatically disabled.

Package the binaries into libinput-bin while being careful with
packaging as the main package gets renamed to libinput10.

Add patch to fix a race in install.

Signed-off-by: Jussi Kukkonen 
---

Changes since v1:
* Fix the install race found on autobuilder

Thanks,
  Jussi


 .../0001-tools-Fix-race-in-autotools-install.patch | 37 ++
 .../{libinput_1.7.3.bb => libinput_1.8.1.bb}   | 17 +++---
 2 files changed, 49 insertions(+), 5 deletions(-)
 create mode 100644 
meta/recipes-graphics/wayland/libinput/0001-tools-Fix-race-in-autotools-install.patch
 rename meta/recipes-graphics/wayland/{libinput_1.7.3.bb => libinput_1.8.1.bb} 
(54%)

diff --git 
a/meta/recipes-graphics/wayland/libinput/0001-tools-Fix-race-in-autotools-install.patch
 
b/meta/recipes-graphics/wayland/libinput/0001-tools-Fix-race-in-autotools-install.patch
new file mode 100644
index 000..4667538
--- /dev/null
+++ 
b/meta/recipes-graphics/wayland/libinput/0001-tools-Fix-race-in-autotools-install.patch
@@ -0,0 +1,37 @@
+From 5e8864c5b7a2e258eea041b0ef66dac7fcab9b7f Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen 
+Date: Wed, 9 Aug 2017 09:47:14 +0300
+Subject: [PATCH] tools: Fix race in (autotools) install
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+exec/data distinction is done based on install dir so compat scripts
+must be moved in exec hook.
+
+This should fix this occasional failure:
+| install: cannot change permissions of
+| ‘/usr/bin/libinput-debug-events.compat’: No such file or directory
+
+Signed-off-by: Jussi Kukkonen 
+Upstream-Status: Submitted
+---
+ tools/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/Makefile.am b/tools/Makefile.am
+index 2c8660b..7ee8b90 100644
+--- a/tools/Makefile.am
 b/tools/Makefile.am
+@@ -63,7 +63,7 @@ endif
+ 
+ EXTRA_DIST = make-ptraccel-graphs.sh install-compat-scripts.sh $(bin_SCRIPTS)
+ 
+-install-data-hook:
++install-exec-hook:
+   (cd $(DESTDIR)$(bindir) && mv libinput-list-devices.compat 
libinput-list-devices)
+   (cd $(DESTDIR)$(bindir) && mv libinput-debug-events.compat 
libinput-debug-events)
+ 
+-- 
+2.13.3
+
diff --git a/meta/recipes-graphics/wayland/libinput_1.7.3.bb 
b/meta/recipes-graphics/wayland/libinput_1.8.1.bb
similarity index 54%
rename from meta/recipes-graphics/wayland/libinput_1.7.3.bb
rename to meta/recipes-graphics/wayland/libinput_1.8.1.bb
index 6194fba..f75298b 100644
--- a/meta/recipes-graphics/wayland/libinput_1.7.3.bb
+++ b/meta/recipes-graphics/wayland/libinput_1.8.1.bb
@@ -9,17 +9,24 @@ DEPENDS = "libevdev udev mtdev"
 
 SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BP}.tar.xz \

file://touchpad-serial-synaptics-need-to-fake-new-touches-on-TRIPLETAP.patch \
+   file://0001-tools-Fix-race-in-autotools-install.patch \
 "
-SRC_URI[md5sum] = "f2993b477db8d7ec0e785ce04ffecb03"
-SRC_URI[sha256sum] = 
"096d612d2711f0caa2de544976ff3729e6233511ab373808644cc2dd5affcb1d"
 
-inherit autotools pkgconfig
+SRC_URI[md5sum] = "8247f0bb67052ffb272c50c3cb9c5998"
+SRC_URI[sha256sum] = 
"e3590a9037e561a5791c8bd3b34bfd30fad5cacd8cbefc0d75fafe3a41d07147"
+
+inherit autotools pkgconfig lib_package
 
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind"
 PACKAGECONFIG[libwacom] = "--enable-libwacom,--disable-libwacom,libwacom"
-PACKAGECONFIG[gui] = "--enable-event-gui,--disable-event-gui,cairo gtk+3"
+PACKAGECONFIG[gui] = "--enable-debug-gui,--disable-debug-gui,cairo gtk+3"
 
 UDEVDIR = "`pkg-config --variable=udevdir udev`"
 
-EXTRA_OECONF += "--with-udev-dir=${UDEVDIR}"
+EXTRA_OECONF += "--with-udev-dir=${UDEVDIR} --disable-documentation 
--disable-tests"
+
+# package name changed in 1.8.1 upgrade: make sure package upgrades work
+RPROVIDES_${PN} = "libinput"
+RREPLACES_${PN} = "libinput"
+RCONFLICTS_${PN} = "libinput"
-- 
2.1.4

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