Re: [OE-core] [PATCH] kernel.bbclass: improve reproducibility

2017-05-19 Thread Trevor Woerner
Should this be configurable?

Is there an assumption everyone who uses oe-core wants reproducible builds?

Could this affect one's ability to perform debugging?
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] devtool/standard.py: Enable perf to be buildable

2017-05-19 Thread Saul Wold
Perf is a tool build from the kernel source, which is normally available
in /work-shared/..., but when devtool is used to modify the kernel
source code, perf is not buildable since it gets an error about being unable
to add a depends to a non-exisit task do_patch.

This patch removes do_patch from the SRCTREECOVEREDTASKS and creates an empty
do_patch task to enable the VarFlags code to have someplace to attach depends
information to.

[YOCT #11120]

Signed-off-by: Saul Wold 
---
 scripts/lib/devtool/standard.py | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 5ff1e23..2ecef99 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -842,7 +842,10 @@ def modify(args, config, basepath, workspace):
 
 if bb.data.inherits_class('kernel', rd):
 f.write('SRCTREECOVEREDTASKS = "do_validate_branches 
do_kernel_checkout '
-'do_fetch do_unpack do_patch do_kernel_configme 
do_kernel_configcheck"\n')
+'do_fetch do_unpack do_kernel_configme 
do_kernel_configcheck"\n')
+f.write('\ndo_patch() {\n'
+':\n'
+'}\n')
 f.write('\ndo_configure_append() {\n'
 'cp ${B}/.config ${S}/.config.baseline\n'
 'ln -sfT ${B}/.config ${S}/.config.new\n'
-- 
2.7.4

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


Re: [OE-core] [PATCH v4 7/7] image_types_wic: schedule prepare_wic_build correctly

2017-05-19 Thread Wold, Saul
On Wed, 2017-05-17 at 13:47 +, Ed Bartosh wrote:
> Scheduled prepare_wic_build only if wic build enabled.
> Added dependencies to kernel and efi bootloader deploy
> tasks only if EFI is enabled.
> 
> This should fix build failure on machines without
> EFI functionality.
> 
> Signed-off-by: Ed Bartosh 
> ---
>  meta/classes/image_types_wic.bbclass | 27 ++--
> ---
>  1 file changed, 14 insertions(+), 13 deletions(-)
> 
> diff --git a/meta/classes/image_types_wic.bbclass
> b/meta/classes/image_types_wic.bbclass
> index d8430e49ac..3b73261d5e 100644
> --- a/meta/classes/image_types_wic.bbclass
> +++ b/meta/classes/image_types_wic.bbclass
> @@ -69,6 +69,11 @@ python () {
>  # file in process_wks_template as well, so just put
> it in
>  # a variable and let the metadata deal with the
> deps.
>  d.setVar('_WKS_TEMPLATE', body)
> +
> +bb.build.addtask('do_prepare_wic_build', 'do_image_wic',
> None, d)
> +if d.getVar('EFI_CLASS'):
> +d.appendVarFlag('do_prepare_wic_build', 'depends',
> +'%s%s:do_deploy 
> virtual/kernel:do_deploy' % (d.getVar('MLPREFIX'),
> d.getVar('EFI_CLASS')))

Ed, 
Have you tested this with any layers?  I tied recently with meta-
intel and tripped over an issue with the rmc-boot not having an actual
target for the EFI_CLASS to have a deploy task caused a failure.

Sau!

>  }
>  
>  #
> @@ -139,19 +144,15 @@ python do_prepare_wic_build() {
>  with open(wks_file, 'w') as f:
>  f.write(template_body)
>  
> -if d.getVar('USING_WIC'):
> -# Generate parition UUID
> -from uuid import uuid4
> -partuuid = str(uuid4())
> -d.setVar("ROOTFS_PARTUUID", partuuid)
> +# Generate parition UUID
> +from uuid import uuid4
> +partuuid = str(uuid4())
> +d.setVar("ROOTFS_PARTUUID", partuuid)
>  
> -if d.getVar("EFI_CLASS"):
> -populate_bootfs(partuuid)
> +if d.getVar("EFI_CLASS"):
> +populate_bootfs(partuuid)
>  
> -template = d.getVar("_WKS_TEMPLATE")
> -if template:
> -write_wks_template(template, d.getVar('WKS_FULL_PATH'))
> +template = d.getVar("_WKS_TEMPLATE")
> +if template:
> +write_wks_template(template, d.getVar('WKS_FULL_PATH'))
>  }
> -
> -addtask do_prepare_wic_build before do_image_wic
> -do_prepare_wic_build[depends] =
> "${MLPREFIX}${EFI_PROVIDER}:do_deploy virtual/kernel:do_deploy"
> -- 
> 2.12.0
> 
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] package_manager.py: Add PACKAGE_ENABLE_FILELIST option to OpkgIndexer

2017-05-19 Thread Haris Okanovic

Why not use files-in-package.txt reports in buildhistory?
https://bugzilla.yoctoproject.org/show_bug.cgi?id=5870


Practical reason: files-in-package.txt is an OE-ism. Our opkg-based 
distribution provides software feeds built outside of OE. We use 
opkg-utils to generate feed metadata like OE, so it makes sense to reuse 
logic instead of rewriting it. Others may be in the same position.


Philosophical reason: I prefer to build the file list (and index) from 
actual packages (I.e. exactly what we're shipping) instead of OE's 
environment. This makes the file list and index more easily reproducible 
and insulates that process from OE bugs.


-- Haris


On 05/19/2017 12:29 PM, Martin Jansa wrote:

On Fri, May 19, 2017 at 10:01:21AM -0500, Haris Okanovic wrote:

Setting PACKAGE_ENABLE_FILELIST option generates Packages.filelist on
`bitbake package-index`, which is index of files provided by each
IPK package in the feed. It's useful for figuring out which package
provides a particular file/program/library/etc.

Disabled by default since generating a filelist involves reading the
payload of every package in the feed, a time and IO intensive operation
many users won't want to run. Those who do may flip this switch.

Testing:
 * Built an opkg index with PACKAGE_ENABLE_FILELIST unset and verified
   no Packages.filelist are generated.
 * Built with PACKAGE_ENABLE_FILELIST="1" and verified each subfeed
   has Packages.filelist; took ~3min longer for 8,200 IPKs.

Signed-off-by: Haris Okanovic 


Why not use files-in-package.txt reports in buildhistory?
https://bugzilla.yoctoproject.org/show_bug.cgi?id=5870

That should work for any package backend and better to generate it once
in one place.


---
 meta/lib/oe/package_manager.py | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index b4b359a8c6..5e1fc48500 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -161,6 +161,8 @@ class OpkgIndexer(Indexer):
 else:
 signer = None

+enable_filelist = bb.utils.to_boolean(self.d.getVar('PACKAGE_ENABLE_FILELIST', 
True) or "False")
+
 if not os.path.exists(os.path.join(self.deploy_dir, "Packages")):
 open(os.path.join(self.deploy_dir, "Packages"), "w").close()

@@ -175,14 +177,18 @@ class OpkgIndexer(Indexer):
 pkgs_dir = os.path.join(self.deploy_dir, arch)
 pkgs_file = os.path.join(pkgs_dir, "Packages")

+filelist_cmd = ""
+if enable_filelist:
+filelist_cmd = '-l %s.filelist' % (pkgs_file)
+
 if not os.path.isdir(pkgs_dir):
 continue

 if not os.path.exists(pkgs_file):
 open(pkgs_file, "w").close()

-index_cmds.add('%s -r %s -p %s -m %s' %
-  (opkg_index_cmd, pkgs_file, pkgs_file, 
pkgs_dir))
+index_cmds.add('%s -r %s -p %s -m %s %s' %
+  (opkg_index_cmd, pkgs_file, pkgs_file, 
filelist_cmd, pkgs_dir))

 index_sign_files.add(pkgs_file)

--
2.12.1

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





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


[OE-core] [oe-core][PATCH 1/1] ghostscript: move to version 9.21

2017-05-19 Thread Joe Slater
Eliminate CVE patches that are now in source.  Add CVE-2017-7975
patch.

Signed-off-by: Joe Slater 
---
 .../ghostscript/ghostscript/CVE-2016-10219.patch   | 49 ---
 .../ghostscript/ghostscript/CVE-2016-10220.patch   | 55 --
 .../ghostscript/ghostscript/CVE-2017-7975.patch| 35 ++
 ...t-9.21-native-fix-disable-system-libtiff.patch} | 22 -
 ... => ghostscript-9.21-prevent_recompiling.patch} | 25 +-
 .../{ghostscript_9.20.bb => ghostscript_9.21.bb}   | 13 +++--
 6 files changed, 63 insertions(+), 136 deletions(-)
 delete mode 100644 
meta/recipes-extended/ghostscript/ghostscript/CVE-2016-10219.patch
 delete mode 100644 
meta/recipes-extended/ghostscript/ghostscript/CVE-2016-10220.patch
 create mode 100644 
meta/recipes-extended/ghostscript/ghostscript/CVE-2017-7975.patch
 rename 
meta/recipes-extended/ghostscript/ghostscript/{ghostscript-native-fix-disable-system-libtiff.patch
 => ghostscript-9.21-native-fix-disable-system-libtiff.patch} (67%)
 rename 
meta/recipes-extended/ghostscript/ghostscript/{ghostscript-9.02-prevent_recompiling.patch
 => ghostscript-9.21-prevent_recompiling.patch} (81%)
 rename meta/recipes-extended/ghostscript/{ghostscript_9.20.bb => 
ghostscript_9.21.bb} (89%)

diff --git a/meta/recipes-extended/ghostscript/ghostscript/CVE-2016-10219.patch 
b/meta/recipes-extended/ghostscript/ghostscript/CVE-2016-10219.patch
deleted file mode 100644
index 574abe0..000
--- a/meta/recipes-extended/ghostscript/ghostscript/CVE-2016-10219.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 4bef1a1d32e29b68855616020dbff574b9cda08f Mon Sep 17 00:00:00 2001
-From: Robin Watts 
-Date: Thu, 29 Dec 2016 15:57:43 +
-Subject: [PATCH] Bug 697453: Avoid divide by 0 in scan conversion code.
-
-Arithmetic overflow due to extreme values in the scan conversion
-code can cause a division by 0.
-
-Avoid this with a simple extra check.
-
-  dx_old=cf814d81
-  endp->x_next=b0e859b9
-  alp->x_next=8069a73a
-
-leads to dx_den = 0
-
-Upstream-Status: Backport
-CVE: CVE-2016-10219
-
-Signed-off-by: Catalin Enache 

- base/gxfill.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/base/gxfill.c b/base/gxfill.c
-index 99196c0..2f81bb0 100644
 a/base/gxfill.c
-+++ b/base/gxfill.c
-@@ -1741,7 +1741,7 @@ intersect(active_line *endp, active_line *alp, fixed y, 
fixed y1, fixed *p_y_new
- fixed dx_old = alp->x_current - endp->x_current;
- fixed dx_den = dx_old + endp->x_next - alp->x_next;
- 
--if (dx_den <= dx_old)
-+if (dx_den <= dx_old || dx_den == 0)
- return false; /* Intersection isn't possible. */
- dy = y1 - y;
- if_debug3('F', "[F]cross: dy=%g, dx_old=%g, dx_new=%g\n",
-@@ -1750,7 +1750,7 @@ intersect(active_line *endp, active_line *alp, fixed y, 
fixed y1, fixed *p_y_new
- /* Do the computation in single precision */
- /* if the values are small enough. */
- y_new =
--((dy | dx_old) < 1L << (size_of(fixed) * 4 - 1) ?
-+(((ufixed)(dy | dx_old)) < (1L << (size_of(fixed) * 4 - 1)) ?
-  dy * dx_old / dx_den :
-  (INCR_EXPR(mq_cross), fixed_mult_quo(dy, dx_old, dx_den)))
- + y;
--- 
-2.10.2
-
diff --git a/meta/recipes-extended/ghostscript/ghostscript/CVE-2016-10220.patch 
b/meta/recipes-extended/ghostscript/ghostscript/CVE-2016-10220.patch
deleted file mode 100644
index 5e1e8ba..000
--- a/meta/recipes-extended/ghostscript/ghostscript/CVE-2016-10220.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From daf85701dab05f17e924a48a81edc9195b4a04e8 Mon Sep 17 00:00:00 2001
-From: Ken Sharp 
-Date: Wed, 21 Dec 2016 16:54:14 +
-Subject: [PATCH] fix crash with bad data supplied to makeimagedevice
-
-Bug #697450 "Null pointer dereference in gx_device_finalize()"
-
-The problem here is that the code to finalise a device unconditionally
-frees the icc_struct member of the device structure. However this
-particular (weird) device is not setup as a normal device, probably
-because its very, very ancient. Its possible for the initialisation
-of the device to abort with an error before calling gs_make_mem_device()
-which is where the icc_struct member gets allocated (or set to NULL).
-
-If that happens, then the cleanup code tries to free the device, which
-calls finalize() which tries to free a garbage pointer.
-
-Setting the device memory to 0x00 after we allocate it means that the
-icc_struct member will be NULL< and our memory manager allows for that
-happily enough, which avoids the problem.
-
-Upstream-Status: Backport
-CVE: CVE-2016-10220
-
-Signed-off-by: Catalin Enache 

- base/gsdevmem.c | 12 
- 1 file changed, 12 insertions(+)
-
-diff --git a/base/gsdevmem.c b/base/gsdevmem.c
-index 97b9cf4..fe75bcc 100644
 a/base/gsdevmem.c
-+++ b/base/gsdevmem.c
-@@ -225,6 +225,18 @@ gs_makewordimagedevice(gx_device ** 

Re: [OE-core] [PATCH 2/2] bc: upgrade 1.06 to 1.07.1

2017-05-19 Thread Jose Lamego


On 05/19/2017 10:25 AM, Burton, Ross wrote:
> 
> On 18 May 2017 at 23:28, Jose Lamego  > wrote:
> 
> bc recipe must be upgraded to latest version in upstream.
> 
> bc license changed from "GPLv2+ & LGPLv2.1" to "GPLv3+ & LGPLv3"
> The new version exhibits a Parallel Make Race that required
> unsetting PARALLEL_MAKE variable.
> This change was tested with core-image-minimal in qemux86.
> 
> 
> It would be appreciated if you could spend a few minutes looking at what
> the build race is and pushing a fix upstream.  Or at least include a
> comment showing the failure.
> 
> I chased the sed thing as previous releases didn't need it: my build
> machine doesn't even have ed installed so HOSTTOOLS won't help.  This
> appears to be a regression as 1.06 shipped the file that needs ed to
> build.  The makefile now always builds a binary to generate a file that
> it then runs through ed, and it doesn't build this tool correctly in a
> cross environment either:
> 
> | /bin/bash: ./fbc: cannot execute binary file: Exec format error
> 
> (it's trying to run an arm binary on x86)
> 
> I'd suggest that we approach the upstream maintainer and discuss:
> 1) should the tarballs ship libmath.h instead of requiring it to be
> generated
> 2) using CC_FOR_BUILD etc from autoconf-archive to build fbc with the
> host compiler in cross-compile environments
> 3) can sed be used instead of ed to reduce the host requirements
> 
> Ross

Agree. I will contact the bc maintainer and work on the build race. I'll
get back to you with the findings. Thanks for the suggestions!

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



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


[OE-core] State of bitbake world, Failed tasks 2017-05-17

2017-05-19 Thread Martin Jansa
http://www.openembedded.org/wiki/Bitbake_World_Status

== Number of issues - stats ==
{| class='wikitable'
!|Date   !!colspan='3'|Failed tasks 
!!|Signatures !!colspan='14'|QA !!Comment
|-
||  ||qemuarm   ||qemux86   ||qemux86_64||all   
||already-stripped  ||libdir||textrel   ||build-deps
||file-rdeps||version-going-backwards   ||host-user-contaminated
||installed-vs-shipped  ||unknown-configure-option  ||symlink-to-sysroot
||invalid-pkgconfig ||pkgname   ||ldflags   ||compile-host-path 
||  
|-
||2017-05-17||7 ||5 ||6 ||0 ||0 ||1 
||4 ||0 ||0 ||98||0 
||1 ||0 ||0 ||0 ||0 
||0 ||0 ||  
|}

== Failed tasks 2017-05-17 ==

INFO: jenkins-job.sh-1.8.21 Complete log available at 
http://logs.nslu2-linux.org/buildlogs/oe/world/rocko/log.report.20170519_090918.log

=== common (4) ===
* meta-browser/recipes-mozilla/firefox/firefox_45.6.0esr.bb:do_compile
* 
meta-openembedded/meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb:do_configure
* 
meta-openembedded/meta-xfce/recipes-bindings/vala/xfce4-vala_4.10.3.bb:do_configure
* meta-smartphone/meta-shr/recipes-shr/3rdparty/libsensmon_git.bb:do_compile

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

=== qemuarm (3) ===
* 
meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvdial_1.61.bb:do_compile
* 
meta-openembedded/meta-oe/recipes-core/dbus/libdbus-c++_0.9.0.bb:do_compile
* openembedded-core/meta/recipes-sato/webkit/webkitgtk_2.16.1.bb:do_compile

=== qemux86 (1) ===
* 
meta-openembedded/meta-oe/recipes-graphics/xorg-driver/xf86-video-geode_2.11.18.bb:do_compile

=== qemux86_64 (0) ===

=== Number of failed tasks (18) ===
{| class=wikitable
|-
|| qemuarm  || 7 || 
http://logs.nslu2-linux.org/buildlogs/oe/world/rocko/log.world.qemuarm.20170516_235830.log/
 || http://errors.yoctoproject.org/Errors/Build/37823/
|-
|| qemux86  || 5 || 
http://logs.nslu2-linux.org/buildlogs/oe/world/rocko/log.world.qemux86.20170518_065557.log/
 || http://errors.yoctoproject.org/Errors/Build/37941/
|-
|| qemux86_64   || 6 || 
http://logs.nslu2-linux.org/buildlogs/oe/world/rocko/log.world.qemux86-64.20170517_022931.log/
 || http://errors.yoctoproject.org/Errors/Build/37932/
|}

=== PNBLACKLISTs (12) ===

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



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

Complete log: 
http://logs.nslu2-linux.org/buildlogs/oe/world/rocko/log.signatures.20170518_002621.log/


* ERROR: Nothing PROVIDES 'lksctp-tools' (but 
/home/jenkins/oe/world/shr-core/meta-openembedded/meta-networking/recipes-protocols/freediameter/freediameter_1.2.1.bb
 DEPENDS on or otherwise requires it)
* ERROR: lksctp-tools was skipped: Recipe is blacklisted: BROKEN: fails to 
link against sctp_connectx symbol
* ERROR: Required build target 'meta-world-pkgdata' has no buildable 
providers.
* ERROR: no sigdata files were generated for MACHINE qemux86copy in 
/home/jenkins/oe/world/shr-core/tmp-glibc/stamps
* ERROR: Nothing PROVIDES 'lksctp-tools' (but 
/home/jenkins/oe/world/shr-core/meta-openembedded/meta-networking/recipes-protocols/freediameter/freediameter_1.2.1.bb
 DEPENDS on or otherwise requires it)
* ERROR: lksctp-tools was skipped: Recipe is blacklisted: BROKEN: fails to 
link against sctp_connectx symbol
* ERROR: Required build target 'meta-world-pkgdata' has no buildable 
providers.
* ERROR: no sigdata files were generated for MACHINE qemux86 in 
/home/jenkins/oe/world/shr-core/tmp-glibc/stamps
* ERROR: Nothing PROVIDES 'lksctp-tools' (but 
/home/jenkins/oe/world/shr-core/meta-openembedded/meta-networking/recipes-protocols/freediameter/freediameter_1.2.1.bb
 DEPENDS on or otherwise requires it)
* ERROR: lksctp-tools was skipped: Recipe is blacklisted: BROKEN: fails to 
link against sctp_connectx symbol
* ERROR: Required build target 'meta-world-pkgdata' has no buildable 
providers.
* ERROR: no sigdata files were generated for MACHINE qemuarm in 
/home/jenkins/oe/world/shr-core/tmp-glibc/stamps

PNBLACKLISTs:
openembedded-core/:
meta-browser:
recipes-browser/chromium/cef3_280796.bb:PNBLACKLIST[cef3] ?= "BROKEN: fails to 
build with gcc-6"
meta-openembedded:

Re: [OE-core] [PATCH 1/4] masterimage.py: fix issue with calling reboot on masterimage/DUT

2017-05-19 Thread Erik Botö

On 2017-05-19 16:59, Leonardo Sandoval wrote:


On Fri, 2017-05-19 at 16:20 +0200, Erik Botö wrote:

On systemd systems calling reboot over an ssh connection doesn't
return as expected causing an exception, therefore wrap the call
to reboot in order to avoid this issue.

Signed-off-by: Erik Botö 
---
  meta/lib/oeqa/controllers/masterimage.py | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/controllers/masterimage.py 
b/meta/lib/oeqa/controllers/masterimage.py
index 07418fcda1..6cdcfa3068 100644
--- a/meta/lib/oeqa/controllers/masterimage.py
+++ b/meta/lib/oeqa/controllers/masterimage.py
@@ -108,7 +108,7 @@ class 
MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta
  time.sleep(10)
  self.power_ctl("cycle")
  else:
-status, output = conn.run("reboot")
+status, output = conn.run("{ sleep 1; reboot; } > /dev/null &")

what would make the difference having the sleep before reboot?


It's an extra safety measure to make sure that reboot hasn't had time to 
do anything before the command returns. Inspired by: 
https://unix.stackexchange.com/questions/58271/closing-connection-after-executing-reboot-using-ssh-command





  if status != 0:
  bb.error("Failed rebooting target and no power control command 
defined. You need to manually reset the device.\n%s" % output)
  
--

2.11.0





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


Re: [OE-core] [PATCH] tzcode-native: quote ${CC}

2017-05-19 Thread Khem Raj
On Fri, May 19, 2017 at 11:07 AM, Denys Dmytriyenko  wrote:
> On Fri, May 19, 2017 at 01:37:59AM +0200, Enrico Scholz wrote:
>> Denys Dmytriyenko  writes:
>>
>> >> -EXTRA_OEMAKE += "cc=${CC}"
>> >> +EXTRA_OEMAKE += "cc='${CC}'"
>> >
>> > Should these be double-quotes around ${CC}?
>>
>> I wrote it in this way:
>>
>> - to 60%, because '' is more correct than "" in this context (see below)
>>
>> - to 40%, because "" would clutter code too much and I can not say
>>   whether it must be quoted as \", \\" or whether perhaps plain " works
>>   too
>
> FWIW, bitbake handles nested quotes properly, no escaping needed:
>
> +EXTRA_OEMAKE += "cc="${CC}""
>
>
>> A yet more correct solution would be
>>
>> | export cc = "${CC}"
>>
>> in the recipe (outside of do_*()) and perhaps adding '-e' to EXTRA_OEMAKE.
>>
>>
>> This handles additionally the case when 'CC' contains a single quote
>> (which causes misbehavior in my patch).
>>
>> Double quotes are much more worse because CC must not contain '$', '`'
>> or '\\' (which is not uncommon in flags like '-DFOO()=\"bar\"').  In OE,
>> it is not expected that these characters are interpreted directly by the
>> shell (${CC} is passed properly quoted in the environment).
>>
>> But all this does not matter... correct quoting is neglactted in OE and
>> bitbake; when you are lucky, commands are written as "foo '%s'" % path.
>> But nobody uses functions like 'pipes.quote()' or a non-shell variants
>> like subprocess.call(['foo', path]).
>>
>> So, you can assume that '${FOO}' expands to the same value like "${FOO}".
>
> Yes, bitbake variables will be expanded properly regardles of the quotes.
> Passing a shell variable may cause problems, but may not be a good practice
> in general.

you can toggle '' and "" strings, will keep the readability and embed
the string too

>
> --
> Denys
> --
> ___
> 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] tzcode-native: quote ${CC}

2017-05-19 Thread Denys Dmytriyenko
On Fri, May 19, 2017 at 01:37:59AM +0200, Enrico Scholz wrote:
> Denys Dmytriyenko  writes:
> 
> >> -EXTRA_OEMAKE += "cc=${CC}"
> >> +EXTRA_OEMAKE += "cc='${CC}'"
> >
> > Should these be double-quotes around ${CC}?
> 
> I wrote it in this way:
> 
> - to 60%, because '' is more correct than "" in this context (see below)
> 
> - to 40%, because "" would clutter code too much and I can not say
>   whether it must be quoted as \", \\" or whether perhaps plain " works
>   too

FWIW, bitbake handles nested quotes properly, no escaping needed:

+EXTRA_OEMAKE += "cc="${CC}""


> A yet more correct solution would be
> 
> | export cc = "${CC}"
> 
> in the recipe (outside of do_*()) and perhaps adding '-e' to EXTRA_OEMAKE.
> 
> 
> This handles additionally the case when 'CC' contains a single quote
> (which causes misbehavior in my patch).
> 
> Double quotes are much more worse because CC must not contain '$', '`'
> or '\\' (which is not uncommon in flags like '-DFOO()=\"bar\"').  In OE,
> it is not expected that these characters are interpreted directly by the
> shell (${CC} is passed properly quoted in the environment).
> 
> But all this does not matter... correct quoting is neglactted in OE and
> bitbake; when you are lucky, commands are written as "foo '%s'" % path.
> But nobody uses functions like 'pipes.quote()' or a non-shell variants
> like subprocess.call(['foo', path]).
> 
> So, you can assume that '${FOO}' expands to the same value like "${FOO}".

Yes, bitbake variables will be expanded properly regardles of the quotes. 
Passing a shell variable may cause problems, but may not be a good practice 
in general.

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


Re: [OE-core] [PATCH] package_manager.py: Add PACKAGE_ENABLE_FILELIST option to OpkgIndexer

2017-05-19 Thread Martin Jansa
On Fri, May 19, 2017 at 10:01:21AM -0500, Haris Okanovic wrote:
> Setting PACKAGE_ENABLE_FILELIST option generates Packages.filelist on
> `bitbake package-index`, which is index of files provided by each
> IPK package in the feed. It's useful for figuring out which package
> provides a particular file/program/library/etc.
> 
> Disabled by default since generating a filelist involves reading the
> payload of every package in the feed, a time and IO intensive operation
> many users won't want to run. Those who do may flip this switch.
> 
> Testing:
>  * Built an opkg index with PACKAGE_ENABLE_FILELIST unset and verified
>no Packages.filelist are generated.
>  * Built with PACKAGE_ENABLE_FILELIST="1" and verified each subfeed
>has Packages.filelist; took ~3min longer for 8,200 IPKs.
> 
> Signed-off-by: Haris Okanovic 

Why not use files-in-package.txt reports in buildhistory?
https://bugzilla.yoctoproject.org/show_bug.cgi?id=5870

That should work for any package backend and better to generate it once
in one place.

> ---
>  meta/lib/oe/package_manager.py | 10 --
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
> index b4b359a8c6..5e1fc48500 100644
> --- a/meta/lib/oe/package_manager.py
> +++ b/meta/lib/oe/package_manager.py
> @@ -161,6 +161,8 @@ class OpkgIndexer(Indexer):
>  else:
>  signer = None
>  
> +enable_filelist = 
> bb.utils.to_boolean(self.d.getVar('PACKAGE_ENABLE_FILELIST', True) or "False")
> +
>  if not os.path.exists(os.path.join(self.deploy_dir, "Packages")):
>  open(os.path.join(self.deploy_dir, "Packages"), "w").close()
>  
> @@ -175,14 +177,18 @@ class OpkgIndexer(Indexer):
>  pkgs_dir = os.path.join(self.deploy_dir, arch)
>  pkgs_file = os.path.join(pkgs_dir, "Packages")
>  
> +filelist_cmd = ""
> +if enable_filelist:
> +filelist_cmd = '-l %s.filelist' % (pkgs_file)
> +
>  if not os.path.isdir(pkgs_dir):
>  continue
>  
>  if not os.path.exists(pkgs_file):
>  open(pkgs_file, "w").close()
>  
> -index_cmds.add('%s -r %s -p %s -m %s' %
> -  (opkg_index_cmd, pkgs_file, pkgs_file, 
> pkgs_dir))
> +index_cmds.add('%s -r %s -p %s -m %s %s' %
> +  (opkg_index_cmd, pkgs_file, pkgs_file, 
> filelist_cmd, pkgs_dir))
>  
>  index_sign_files.add(pkgs_file)
>  
> -- 
> 2.12.1
> 
> -- 
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

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


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


Re: [OE-core] [meta-oe][resend][PATCH] sysstat: fixup pkg_postinst to allow SYSTEMD_AUTO_ENABLE to work

2017-05-19 Thread Mark Asselstine
On Tuesday, May 9, 2017 4:51:37 PM EDT Mark Asselstine wrote:
> The logic added to the pkg_postinst in commit 6bf82c26f953 has the
> side effect of rendering SYSTEMD_AUTO_ENABLE ineffective. The systemd
> service will not be configured as 'enabled' either offline(do_rootfs)
> or during first boot. Since the volatiles, as used, in the
> pkg_postinst are unused with systemd we can simply skip the
> pkg_postinst when not using sysvinit.
> 
> Signed-off-by: Mark Asselstine 
> ---

Is there a reason this change is again sitting without any comments or being 
merged. The recipe as-is is broken in a way that might frustrate people and I 
am attempting to aliviate this frustration with this change.

Mark

>  meta/recipes-extended/sysstat/sysstat.inc | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-extended/sysstat/sysstat.inc
> b/meta/recipes-extended/sysstat/sysstat.inc index bb5629d..fce2804 100644
> --- a/meta/recipes-extended/sysstat/sysstat.inc
> +++ b/meta/recipes-extended/sysstat/sysstat.inc
> @@ -42,7 +42,9 @@ do_install() {
>   sed -i -e 's#@LIBDIR@#${libdir}#g'
> ${D}${systemd_unitdir}/system/sysstat.service }
> 
> -pkg_postinst_${PN} () {
> +OVERRIDES_append = "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit',
> ':sysvinit', '', d)}" +
> +pkg_postinst_${PN}_sysvinit () {
>  if [ -n "$D" ]; then
>  exit 0
>  fi




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


[OE-core] [PATCH] package_manager.py: Add PACKAGE_ENABLE_FILELIST option to OpkgIndexer

2017-05-19 Thread Haris Okanovic
Setting PACKAGE_ENABLE_FILELIST option generates Packages.filelist on
`bitbake package-index`, which is index of files provided by each
IPK package in the feed. It's useful for figuring out which package
provides a particular file/program/library/etc.

Disabled by default since generating a filelist involves reading the
payload of every package in the feed, a time and IO intensive operation
many users won't want to run. Those who do may flip this switch.

Testing:
 * Built an opkg index with PACKAGE_ENABLE_FILELIST unset and verified
   no Packages.filelist are generated.
 * Built with PACKAGE_ENABLE_FILELIST="1" and verified each subfeed
   has Packages.filelist; took ~3min longer for 8,200 IPKs.

Signed-off-by: Haris Okanovic 
---
 meta/lib/oe/package_manager.py | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index b4b359a8c6..5e1fc48500 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -161,6 +161,8 @@ class OpkgIndexer(Indexer):
 else:
 signer = None
 
+enable_filelist = 
bb.utils.to_boolean(self.d.getVar('PACKAGE_ENABLE_FILELIST', True) or "False")
+
 if not os.path.exists(os.path.join(self.deploy_dir, "Packages")):
 open(os.path.join(self.deploy_dir, "Packages"), "w").close()
 
@@ -175,14 +177,18 @@ class OpkgIndexer(Indexer):
 pkgs_dir = os.path.join(self.deploy_dir, arch)
 pkgs_file = os.path.join(pkgs_dir, "Packages")
 
+filelist_cmd = ""
+if enable_filelist:
+filelist_cmd = '-l %s.filelist' % (pkgs_file)
+
 if not os.path.isdir(pkgs_dir):
 continue
 
 if not os.path.exists(pkgs_file):
 open(pkgs_file, "w").close()
 
-index_cmds.add('%s -r %s -p %s -m %s' %
-  (opkg_index_cmd, pkgs_file, pkgs_file, 
pkgs_dir))
+index_cmds.add('%s -r %s -p %s -m %s %s' %
+  (opkg_index_cmd, pkgs_file, pkgs_file, 
filelist_cmd, pkgs_dir))
 
 index_sign_files.add(pkgs_file)
 
-- 
2.12.1

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


[OE-core] [PATCH 3/3] run-postinsts: do not reload daemon configuration

2017-05-19 Thread Max Krummenacher
In case a systemd service disables itself while init is still in its
boot sequence the reloading of the service files can be problematic.
In that case: It seems that systemd can loose the state of .device units,
and some services depend on such units (namely serial consoles such as
serial-getty@ttyS0.service). As a result no getty is spawned on the
affected serial tty.
After a power-cycle the second boot (which does not disable services)
succeeds.

The following sequence shows this problem:

| Jan 09 16:36:28 apalis-t30 systemctl[162]: Removed 
/etc/systemd/system/sysinit.target.wants/run-postinsts.service.
| Jan 09 16:36:28 apalis-t30 systemd[1]: Reloading.
|...
|And then the failing one:
| Feb 22 15:33:15 apalis-t30 systemd[1]: dev-ttyS0.device: Job 
dev-ttyS0.device/start timed out.
| Feb 22 15:33:15 apalis-t30 systemd[1]: Timed out waiting for device 
dev-ttyS0.device.
| Feb 22 15:33:15 apalis-t30 systemd[1]: Dependency failed for Serial Getty on 
ttyS0.
| Feb 22 15:33:15 apalis-t30 systemd[1]: serial-getty@ttyS0.service: Job 
serial-getty@ttyS0.service/start failed with result 'dependency'.
| Feb 22 15:33:15 apalis-t30 systemd[1]: dev-ttyS0.device: Job 
dev-ttyS0.device/start failed with result 'timeout'.
| Feb 22 15:33:15 apalis-t30 systemd[1]: Reached target Login Prompts.

(the time has been updated between this two events, but that does not
influence the issue)

Using --no-reload in the service file avoids the "Reloading." message
above and seems to not cause such issues anymore.

Signed-off-by: Stefan Agner 
Signed-off-by: Max Krummenacher 
---
 meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service 
b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service
index 85a0439..1b71a1f 100644
--- a/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service
+++ b/meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts.service
@@ -8,7 +8,7 @@ ConditionPathExistsGlob=#SYSCONFDIR#/*-postinsts
 [Service]
 Type=oneshot
 ExecStart=#SBINDIR#/run-postinsts
-ExecStartPost=#BASE_BINDIR#/systemctl disable run-postinsts.service
+ExecStartPost=#BASE_BINDIR#/systemctl --no-reload disable run-postinsts.service
 RemainAfterExit=No
 TimeoutSec=0
 
-- 
2.9.3

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


[OE-core] [PATCH 2/3] opkg-configure: do not reload daemon configuration

2017-05-19 Thread Max Krummenacher
In case a systemd service disables itself while init is still in its
boot sequence the reloading of the service files can be problematic.
In that case: It seems that systemd can loose the state of .device units,
and some services depend on such units (namely serial consoles such as
serial-getty@ttyS0.service). As a result no getty is spawned on the
affected serial tty.
After a power-cycle the second boot (which does not disable services)
succeeds.

The following sequence shows this problem:

| Jan 09 16:36:28 apalis-t30 systemctl[162]: Removed 
/etc/systemd/system/sysinit.target.wants/run-postinsts.service.
| Jan 09 16:36:28 apalis-t30 systemd[1]: Reloading.
|...
|And then the failing one:
| Feb 22 15:33:15 apalis-t30 systemd[1]: dev-ttyS0.device: Job 
dev-ttyS0.device/start timed out.
| Feb 22 15:33:15 apalis-t30 systemd[1]: Timed out waiting for device 
dev-ttyS0.device.
| Feb 22 15:33:15 apalis-t30 systemd[1]: Dependency failed for Serial Getty on 
ttyS0.
| Feb 22 15:33:15 apalis-t30 systemd[1]: serial-getty@ttyS0.service: Job 
serial-getty@ttyS0.service/start failed with result 'dependency'.
| Feb 22 15:33:15 apalis-t30 systemd[1]: dev-ttyS0.device: Job 
dev-ttyS0.device/start failed with result 'timeout'.
| Feb 22 15:33:15 apalis-t30 systemd[1]: Reached target Login Prompts.

(the time has been updated between this two events, but that does not
influence the issue)

Using --no-reload in the service file avoids the "Reloading." message
above and seems to not cause such issues anymore.

Signed-off-by: Stefan Agner 
Signed-off-by: Max Krummenacher 
---
 meta/recipes-devtools/opkg/opkg/opkg-configure.service | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/opkg/opkg/opkg-configure.service 
b/meta/recipes-devtools/opkg/opkg/opkg-configure.service
index 8e74026..432c3dd 100644
--- a/meta/recipes-devtools/opkg/opkg/opkg-configure.service
+++ b/meta/recipes-devtools/opkg/opkg/opkg-configure.service
@@ -8,7 +8,7 @@ Before=sysinit.target
 Type=oneshot
 EnvironmentFile=-@SYSCONFDIR@/default/postinst
 ExecStart=-@BASE_BINDIR@/sh -c " if [ $POSTINST_LOGGING = '1' ]; then 
@BINDIR@/opkg configure > $LOGFILE 2>&1; else @BINDIR@/opkg configure; fi"
-ExecStartPost=@BASE_BINDIR@/systemctl disable opkg-configure.service
+ExecStartPost=@BASE_BINDIR@/systemctl --no-reload disable 
opkg-configure.service
 StandardOutput=syslog
 RemainAfterExit=No
 
-- 
2.9.3

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


[OE-core] [PATCH 1/3] dpkg-configure: do not reload daemon configuration

2017-05-19 Thread Max Krummenacher
In case a systemd service disables itself while init is still in its
boot sequence the reloading of the service files can be problematic.
In that case: It seems that systemd can loose the state of .device units,
and some services depend on such units (namely serial consoles such as
serial-getty@ttyS0.service). As a result no getty is spawned on the
affected serial tty.
After a power-cycle the second boot (which does not disable services)
succeeds.

The following sequence shows this problem:

| Jan 09 16:36:28 apalis-t30 systemctl[162]: Removed 
/etc/systemd/system/sysinit.target.wants/run-postinsts.service.
| Jan 09 16:36:28 apalis-t30 systemd[1]: Reloading.
|...
|And then the failing one:
| Feb 22 15:33:15 apalis-t30 systemd[1]: dev-ttyS0.device: Job 
dev-ttyS0.device/start timed out.
| Feb 22 15:33:15 apalis-t30 systemd[1]: Timed out waiting for device 
dev-ttyS0.device.
| Feb 22 15:33:15 apalis-t30 systemd[1]: Dependency failed for Serial Getty on 
ttyS0.
| Feb 22 15:33:15 apalis-t30 systemd[1]: serial-getty@ttyS0.service: Job 
serial-getty@ttyS0.service/start failed with result 'dependency'.
| Feb 22 15:33:15 apalis-t30 systemd[1]: dev-ttyS0.device: Job 
dev-ttyS0.device/start failed with result 'timeout'.
| Feb 22 15:33:15 apalis-t30 systemd[1]: Reached target Login Prompts.

(the time has been updated between this two events, but that does not
influence the issue)

Using --no-reload in the service file avoids the "Reloading." message
above and seems to not cause such issues anymore.

Signed-off-by: Stefan Agner 
Signed-off-by: Max Krummenacher 
---
 meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service 
b/meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service
index f0b0789..9a248cc 100644
--- a/meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service
+++ b/meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service
@@ -8,7 +8,7 @@ Before=sysinit.target
 Type=oneshot
 EnvironmentFile=-@SYSCONFDIR@/default/postinst
 ExecStart=-@BASE_BINDIR@/sh -c " if [ $POSTINST_LOGGING = '1' ]; then 
@BINDIR@/dpkg --configure -a > $LOGFILE 2>&1; else @BINDIR@/dpkg --configure 
-a; fi"
-ExecStartPost=@BASE_BINDIR@/systemctl disable dpkg-configure.service
+ExecStartPost=@BASE_BINDIR@/systemctl --no-reload disable 
dpkg-configure.service
 StandardOutput=syslog
 RemainAfterExit=No
 
-- 
2.9.3

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


Re: [OE-core] [PATCH v2] libsolv: don't pick up bundled db from host rpm

2017-05-19 Thread Max Krummenacher
Am Freitag, den 19.05.2017, 16:51 +0100 schrieb Burton, Ross:
> On 19 May 2017 at 16:48, Max Krummenacher  wrote:
> 
> > +Upstream-Status: Inappropriate [oe build specific]
> > 
> 
> Is this really inappropriate?  We're finding a bug in the build system but
> that doesn't mean we're the cause of the breakage.

Yes, I think so.

In the OE setup we have our own sysroot with a variant of rpm-devel and the 
build host has one in
/usr/...

I think that upstream need not assume that it is configured on a build host 
where it sees two
differently configured rpm development packages.

For my approach to work the bundled Berkely db must provide the function 
db_create_rpmdb which is
more likely to change than the filename db.h.

Max

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


[OE-core] [PATCH] kernel: predefine KBUILD_BUILD_USER and KBUILD_BUILD_HOST

2017-05-19 Thread Joshua Lock
By exporting KBUILD_BUILD_USER with a pre-defined value we improve the
reproducibility of the kernel and remove the requirement for whoami in the
HOSTTOOLS.
KBUILD_BUILD_HOST also helps improve the reproducibility of the kernel.

For more kernel reproducibility options see:
https://lwn.net/Articles/437864/

Signed-off-by: Joshua Lock 
---
 meta/classes/kernel.bbclass | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 8954b28..7a134d5 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -130,6 +130,8 @@ PACKAGES_DYNAMIC += "^kernel-firmware-.*"
 
 export OS = "${TARGET_OS}"
 export CROSS_COMPILE = "${TARGET_PREFIX}"
+export KBUILD_BUILD_USER = "oe-user"
+export KBUILD_BUILD_HOST = "oe-host"
 
 KERNEL_PRIORITY ?= 
"${@int(d.getVar('PV').split('-')[0].split('+')[0].split('.')[0]) * 1 + \

int(d.getVar('PV').split('-')[0].split('+')[0].split('.')[1]) * 100 + \
-- 
2.9.3

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


Re: [OE-core] [PATCH v2] libsolv: don't pick up bundled db from host rpm

2017-05-19 Thread Burton, Ross
On 19 May 2017 at 16:48, Max Krummenacher  wrote:

> +Upstream-Status: Inappropriate [oe build specific]
>

Is this really inappropriate?  We're finding a bug in the build system but
that doesn't mean we're the cause of the breakage.

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


[OE-core] [PATCH v2] libsolv: don't pick up bundled db from host rpm

2017-05-19 Thread Max Krummenacher
With rpm v4 in openembedded but on a host with existing /usr/include/rpm/db.h
the native build fails to compile.

Signed-off-by: Max Krummenacher 
---
 ...01-don-t-pick-up-bundled-db-from-host-rpm.patch | 51 ++
 meta/recipes-extended/libsolv/libsolv_0.6.26.bb|  3 +-
 2 files changed, 53 insertions(+), 1 deletion(-)
 create mode 100644 
meta/recipes-extended/libsolv/libsolv/0001-don-t-pick-up-bundled-db-from-host-rpm.patch

changes in V2:

- instead of unconditionally assume db is not bundled
  evaluate the actually linked librpm.so
- fix commit text to include that libsolv-native is failing
  (but not libsolv and nativesdk-libsolv)

diff --git 
a/meta/recipes-extended/libsolv/libsolv/0001-don-t-pick-up-bundled-db-from-host-rpm.patch
 
b/meta/recipes-extended/libsolv/libsolv/0001-don-t-pick-up-bundled-db-from-host-rpm.patch
new file mode 100644
index 000..f99cdca
--- /dev/null
+++ 
b/meta/recipes-extended/libsolv/libsolv/0001-don-t-pick-up-bundled-db-from-host-rpm.patch
@@ -0,0 +1,51 @@
+From f815c166f08f8a0a257630e91c0bcc20409f42cf Mon Sep 17 00:00:00 2001
+From: Max Krummenacher 
+Date: Sun, 7 May 2017 20:28:11 +0100
+Subject: [PATCH] don't pick up bundled db from host rpm
+
+For libsolv-native with rpm v4 in openembedded but on a host with
+existing /usr/include/rpm/db.h the build is configured to have
+HAVE_RPM_DB_H because of the existing header file from the host,
+but linking against the librpm.so in recipe-sysroot-native fails.
+
+Check for a bundled db by testing if librpm.so provides one of
+the db functions.
+
+Fixes the following link errors:
+| ../ext/libsolvext.so.0: undefined reference to `db_create_rpmdb'
+| ../ext/libsolvext.so.0: undefined reference to `db_env_create_rpmdb'
+
+Observed on a openSUSE Leap 42.1 build host with rpm-devel installed.
+
+Upstream-Status: Inappropriate [oe build specific]
+
+Signed-off-by: Max Krummenacher 
+---
+ CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 838f9d0..1ded881 100644
+--- a/CMakeLists.txt
 b/CMakeLists.txt
+@@ -185,7 +185,7 @@ IF (ENABLE_RPMDB)
+ SET (ENABLE_RPMPKG ON)
+ ENDIF (ENABLE_RPMDB)
+ 
+-INCLUDE (CheckIncludeFile)
++INCLUDE (CheckLibraryExists)
+ IF (ENABLE_RPMDB)
+   FIND_LIBRARY (RPMDB_LIBRARY NAMES rpmdb)
+ 
+@@ -206,7 +206,7 @@ IF (ENABLE_RPMDB)
+   ENDIF (RPM5)
+ 
+   # check if rpm contains a bundled berkeley db
+-  CHECK_INCLUDE_FILE(rpm/db.h HAVE_RPM_DB_H)
++  CHECK_LIBRARY_EXISTS(rpm.so db_create_rpmdb "" HAVE_RPM_DB_H)
+   IF (NOT HAVE_RPM_DB_H)
+ FIND_LIBRARY (DB_LIBRARY NAMES db)
+ IF (DB_LIBRARY)
+-- 
+2.12.0
+
diff --git a/meta/recipes-extended/libsolv/libsolv_0.6.26.bb 
b/meta/recipes-extended/libsolv/libsolv_0.6.26.bb
index a33c251..ccd9cfa 100644
--- a/meta/recipes-extended/libsolv/libsolv_0.6.26.bb
+++ b/meta/recipes-extended/libsolv/libsolv_0.6.26.bb
@@ -8,7 +8,8 @@ LIC_FILES_CHKSUM = 
"file://LICENSE.BSD;md5=62272bd11c97396d4aaf1c41bc11f7d8"
 DEPENDS = "expat zlib rpm"
 
 SRC_URI = "git://github.com/openSUSE/libsolv.git \
-   "
+   file://0001-don-t-pick-up-bundled-db-from-host-rpm.patch \
+  "
 SRC_URI_append_libc-musl = " 
file://0001-Add-fallback-fopencookie-implementation.patch \
  
file://0002-Fixes-to-internal-fopencookie-implementation.patch \
"
-- 
2.9.3

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


Re: [OE-core] [PATCH 1/2] conf/bitbake.conf: include ed in hosttools

2017-05-19 Thread Burton, Ross
On 19 May 2017 at 13:54, Jose Lamego  wrote:

> This patch is a requisite for the bc recipe update from 1.06 to 1.07.1,
> which fails due to ed command not found during building.
>

I just replied to the bc patch, the new version is broken in several
interesting ways.

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


Re: [OE-core] [PATCH 2/2] bc: upgrade 1.06 to 1.07.1

2017-05-19 Thread Burton, Ross
On 18 May 2017 at 23:28, Jose Lamego  wrote:

> bc recipe must be upgraded to latest version in upstream.
>
> bc license changed from "GPLv2+ & LGPLv2.1" to "GPLv3+ & LGPLv3"
> The new version exhibits a Parallel Make Race that required
> unsetting PARALLEL_MAKE variable.
> This change was tested with core-image-minimal in qemux86.


It would be appreciated if you could spend a few minutes looking at what
the build race is and pushing a fix upstream.  Or at least include a
comment showing the failure.

I chased the sed thing as previous releases didn't need it: my build
machine doesn't even have ed installed so HOSTTOOLS won't help.  This
appears to be a regression as 1.06 shipped the file that needs ed to
build.  The makefile now always builds a binary to generate a file that it
then runs through ed, and it doesn't build this tool correctly in a cross
environment either:

| /bin/bash: ./fbc: cannot execute binary file: Exec format error

(it's trying to run an arm binary on x86)

I'd suggest that we approach the upstream maintainer and discuss:
1) should the tarballs ship libmath.h instead of requiring it to be
generated
2) using CC_FOR_BUILD etc from autoconf-archive to build fbc with the host
compiler in cross-compile environments
3) can sed be used instead of ed to reduce the host requirements

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


Re: [OE-core] [PATCH 1/4] masterimage.py: fix issue with calling reboot on masterimage/DUT

2017-05-19 Thread Leonardo Sandoval
On Fri, 2017-05-19 at 16:20 +0200, Erik Botö wrote:
> On systemd systems calling reboot over an ssh connection doesn't
> return as expected causing an exception, therefore wrap the call
> to reboot in order to avoid this issue.
> 
> Signed-off-by: Erik Botö 
> ---
>  meta/lib/oeqa/controllers/masterimage.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/lib/oeqa/controllers/masterimage.py 
> b/meta/lib/oeqa/controllers/masterimage.py
> index 07418fcda1..6cdcfa3068 100644
> --- a/meta/lib/oeqa/controllers/masterimage.py
> +++ b/meta/lib/oeqa/controllers/masterimage.py
> @@ -108,7 +108,7 @@ class 
> MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta
>  time.sleep(10)
>  self.power_ctl("cycle")
>  else:
> -status, output = conn.run("reboot")
> +status, output = conn.run("{ sleep 1; reboot; } > /dev/null &")

what would make the difference having the sleep before reboot?


>  if status != 0:
>  bb.error("Failed rebooting target and no power control 
> command defined. You need to manually reset the device.\n%s" % output)
>  
> -- 
> 2.11.0
> 


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


[OE-core] [PATCH 4/4] sshcontrol.py: in copy_to() always use scp

2017-05-19 Thread Erik Botö
The current implementation is broken when the localpath is a link.
Then only a symlink would be created on the target, instead of copying
the actual file.

Signed-off-by: Erik Botö 
---
 meta/lib/oeqa/utils/sshcontrol.py | 9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/meta/lib/oeqa/utils/sshcontrol.py 
b/meta/lib/oeqa/utils/sshcontrol.py
index 05d6502550..d292893c08 100644
--- a/meta/lib/oeqa/utils/sshcontrol.py
+++ b/meta/lib/oeqa/utils/sshcontrol.py
@@ -150,12 +150,9 @@ class SSHControl(object):
 
 def copy_to(self, localpath, remotepath):
 if os.path.islink(localpath):
-link = os.readlink(localpath)
-dst_dir, dst_base = os.path.split(remotepath)
-return self.run("cd %s; ln -s %s %s" % (dst_dir, link, dst_base))
-else:
-command = self.scp + [localpath, '%s@%s:%s' % (self.user, self.ip, 
remotepath)]
-return self._internal_run(command, ignore_status=False)
+localpath = os.path.dirname(localpath) + "/" + 
os.readlink(localpath)
+command = self.scp + [localpath, '%s@%s:%s' % (self.user, self.ip, 
remotepath)]
+return self._internal_run(command, ignore_status=False)
 
 def copy_from(self, remotepath, localpath):
 command = self.scp + ['%s@%s:%s' % (self.user, self.ip, remotepath), 
localpath]
-- 
2.11.0

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


[OE-core] [PATCH 1/4] masterimage.py: fix issue with calling reboot on masterimage/DUT

2017-05-19 Thread Erik Botö
On systemd systems calling reboot over an ssh connection doesn't
return as expected causing an exception, therefore wrap the call
to reboot in order to avoid this issue.

Signed-off-by: Erik Botö 
---
 meta/lib/oeqa/controllers/masterimage.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/controllers/masterimage.py 
b/meta/lib/oeqa/controllers/masterimage.py
index 07418fcda1..6cdcfa3068 100644
--- a/meta/lib/oeqa/controllers/masterimage.py
+++ b/meta/lib/oeqa/controllers/masterimage.py
@@ -108,7 +108,7 @@ class 
MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta
 time.sleep(10)
 self.power_ctl("cycle")
 else:
-status, output = conn.run("reboot")
+status, output = conn.run("{ sleep 1; reboot; } > /dev/null &")
 if status != 0:
 bb.error("Failed rebooting target and no power control command 
defined. You need to manually reset the device.\n%s" % output)
 
-- 
2.11.0

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


[OE-core] [PATCH 3/4] masterimage.py: fix stop()

2017-05-19 Thread Erik Botö
The stop() function is called in the context of the masterimage,
so self.master should be used instead of self.connection which is
undefined at that time.

Signed-off-by: Erik Botö 
---
 meta/lib/oeqa/controllers/masterimage.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/controllers/masterimage.py 
b/meta/lib/oeqa/controllers/masterimage.py
index 18da2799bb..75bcd4b08d 100644
--- a/meta/lib/oeqa/controllers/masterimage.py
+++ b/meta/lib/oeqa/controllers/masterimage.py
@@ -156,7 +156,7 @@ class 
MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta
 
 def stop(self):
 bb.plain("%s - reboot/powercycle target" % self.pn)
-self.power_cycle(self.connection)
+self.power_cycle(self.master)
 
 
 class SystemdbootTarget(MasterImageHardwareTarget):
-- 
2.11.0

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


[OE-core] [PATCH 2/4] masterimage.py: rename parameter "params" in start() to "extra_bootparams"

2017-05-19 Thread Erik Botö
This matches how it is called, and how it is named in qmeu target.

Signed-off-by: Erik Botö 
---
 meta/lib/oeqa/controllers/masterimage.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/controllers/masterimage.py 
b/meta/lib/oeqa/controllers/masterimage.py
index 6cdcfa3068..18da2799bb 100644
--- a/meta/lib/oeqa/controllers/masterimage.py
+++ b/meta/lib/oeqa/controllers/masterimage.py
@@ -143,7 +143,7 @@ class 
MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta
 def _deploy(self):
 pass
 
-def start(self, params=None):
+def start(self, extra_bootparams=None):
 bb.plain("%s - boot test image on target" % self.pn)
 self._start()
 # set the ssh object for the target/test image
-- 
2.11.0

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


[OE-core] [OE-CORE][PATCH] scripts/lib/recipetool/create_npm.py: Fix npm uri_replace

2017-05-19 Thread Davis, Michael
Currently bitbakes uri_replace compares "npm://*/*" to
"npm://registry.npmjs.org".  The lack of the second / causes this to always 
fail.
This results in things like mirror tarballs not functioning.
This patch adds in a / to the link generated by npm://registry.npmjs.org.

Signed-off-by: Michael Davis 
---
 scripts/lib/recipetool/create_npm.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/lib/recipetool/create_npm.py 
b/scripts/lib/recipetool/create_npm.py
index cb8f338..b54f539 100644
--- a/scripts/lib/recipetool/create_npm.py
+++ b/scripts/lib/recipetool/create_npm.py
@@ -126,7 +126,7 @@ class NpmRecipeHandler(RecipeHandler):
 for dep, depdata in deplist.items():
 version = depdata.get('version', None)
 if version:
-url = 
'npm://registry.npmjs.org;name=%s;version=%s;subdir=node_modules/%s' % (dep, 
version, dep)
+url = 
'npm://registry.npmjs.org/;name=%s;version=%s;subdir=node_modules/%s' % (dep, 
version, dep)
 scriptutils.fetch_uri(d, url, srctree)
 src_uri.append(url)
 changed = True
-- 
2.9.4
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/2] conf/bitbake.conf: include ed in hosttools

2017-05-19 Thread Richard Purdie
On Fri, 2017-05-19 at 12:56 +0100, Burton, Ross wrote:
> 
> On 19 May 2017 at 10:02, Anders Darander 
> wrote:
> > As fas as I can (in a recent kernel), whoami is only used in
> > scripts/mkcompile_h. And there, it's only used if
> > $KBUILD_BUILD_USER is
> > empty. I'd rather see that we set $KBUILD_BUILD_USER to something
> > deterministic in our kernel.bbclass.
> > 
> Definitely this.

Agreed, I've mentioned this would be preferred already. I'm just living
in hope someone sends a patch!

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


Re: [OE-core] [PATCH 1/2] conf/bitbake.conf: include ed in hosttools

2017-05-19 Thread Jose Lamego


On 05/19/2017 04:02 AM, Anders Darander wrote:
> * Khem Raj  [170519 01:17]:
> 
>> On Thu, May 18, 2017 at 4:12 PM, Richard Purdie
>>  wrote:
>>> On Thu, 2017-05-18 at 17:28 -0500, Jose Lamego wrote:
 Some recipes build fail due to missing ed command.
> 
 This change includes ed to the hosttools required to
 run builds with oe-core.
> 
 Signed-off-by: Jose Lamego 
 Signed-off-by: Leonardo Sandoval 
> 
>>> We really don't want to add ed here. Which recipes are failing and why
>>> do we need ed to build them?

This patch is a requisite for the bc recipe update from 1.06 to 1.07.1,
which fails due to ed command not found during building.

> 
>> we also need whoami which kernel uses to identify the build user id
> 
> 
> No, we don't want to add whoami...
> 
> As fas as I can (in a recent kernel), whoami is only used in
> scripts/mkcompile_h. And there, it's only used if $KBUILD_BUILD_USER is
> empty. I'd rather see that we set $KBUILD_BUILD_USER to something
> deterministic in our kernel.bbclass.
> 
> Cheers,
> Anders
> 

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



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


Re: [OE-core] [PATCH 1/2] conf/bitbake.conf: include ed in hosttools

2017-05-19 Thread Burton, Ross
On 19 May 2017 at 10:02, Anders Darander  wrote:

> As fas as I can (in a recent kernel), whoami is only used in
> scripts/mkcompile_h. And there, it's only used if $KBUILD_BUILD_USER is
> empty. I'd rather see that we set $KBUILD_BUILD_USER to something
> deterministic in our kernel.bbclass.
>

Definitely this.

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


Re: [OE-core] [PATCH 1/2] bind: build with threads and update configure options

2017-05-19 Thread Burton, Ross
On 19 May 2017 at 09:52,  wrote:

> Build without threads for bind is inherited from legacy openembedded.
> All libc's support proper threading on Linux now, so enable threads
> support for bind.
>
> It is also need to disable static library build which cause package dhcp
> fail to build after enable bind threads support.
>
> Options devpoll and epoll are configured to choose most preferable
> multiplex method for unix socket. The priorities are: epoll > poll >
> select. When set '--enable-epoll', it just defines a var and include
> header file that is available for cross compile. So use epoll for bind.
>
> Add PACKAGECONFIG 'urandom' that could use /dev/urandom as random device.
>
> Update file/directory ownerships to fix daemon start failure.
>

This is changing more than documented:

packages/corei7-64-poky-linux/bind/bind-utils: RDEPENDS: removed "libcrypto
(['>= 1.0.2k'])", added "bind (['>= 9.10.3-P3'])"

(and dhcp has the same dropping of libcrypto)

Is this intentional?

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


[OE-core] [PATCH 00/47] Consolidated pull

2017-05-19 Thread Ross Burton
Another batch of patches that have been building up during the freeze that has
been build-tested on the autobuilder and is all green.

Ross

The following changes since commit ef506f58da3a95fba2696df749b2b81f9c118847:

  cve-check-tool: backport a patch to make CVE checking work (2017-05-18 
14:01:48 +0100)

are available in the git repository at:

  ssh://g...@git.yoctoproject.org/poky-contrib ross/mut

for you to fetch changes up to e3a58876bda9631af1fb7a1f98cb5d0fdfff715c:

  glew: Compile with -D_GNU_SOURCE (2017-05-19 11:55:21 +0100)


Alexander Kanavin (10):
  kconfig-frontends: update to 4.10.0.1
  ffmpeg: update to 3.3
  mpg123: update to 1.24.0
  sysprof: update to 3.24.1
  gdbm: update to 1.13
  gnome-desktop3: update to 3.24.2
  ed: update to 1.14.2
  db: fix upstream version check
  dnf: fix upstream version check
  vulkan: fix upstream version check

Andreas J. Reichel (2):
  wic: Use argparse instead of optparse
  wic: Add missing text to usage and help strings

Carlos Rafael Giani (1):
  mpeg2dec: upgrade to version 0.5.1

Cody P Schafer (1):
  cmake.bbclass: use `cmake --build` to build & install

Ed Bartosh (19):
  selftest: fix test_unsupported_subcommand test case
  systemd-boot: create output dir if it doesn't exist
  efi: add efi_bootfs_populate API
  image_types_wic: add do_populate_bootfs task
  image_types_wic: merged 2 tasks
  oe-selftest: add wic tests for generic EFI
  grub-efi: fixed default value of GRUB_ROOT
  image_types_wic: schedule prepare_wic_build correctly
  filemap: fix skip logic
  filemap: add parameter 'length' to sparse_copy
  bootimg-pcbios: make boot image file unique
  wic: add wic_init_parser_ls
  wic: add help and usage content for 'wic ls'
  wic: add 'wic ls' command
  engine: implement listing wic images
  selftest: add new test case test_wic_ls
  isoimage-isohybrid: don't use TRANSLATED_TARGET_ARCH
  Revert "create-pull-request: add "-t in-reply-to" option"
  create-pull-request: support format-patch options

Huang Qiyu (1):
  libsndfile1: 1.0.27 -> 1.0.28

Jackie Huang (1):
  icu: Use LARGE_BUFFER_MAX_SIZE for cmd

Khem Raj (2):
  grub: Update to 2.02
  glew: Compile with -D_GNU_SOURCE

Marek Vasut (1):
  automake: Backport perl 5.22 fix

Markus Lehtonen (5):
  oeqa.utils.git: use --verify in rev_parse()
  oe-build-perf-report: use correct x-axis max value in html charts
  oe-build-perf-report: two verbosity levels for --list
  oe-build-perf-report: implement --dump-buildstats
  scripts/buildstats-diff: support optimized rusage values

Maxin B. John (1):
  connman: upgrade to 1.34

Paul Eggleton (2):
  recipetool: create: skip values extracted from spec files containing 
macros
  recipetool: create: extract name of package from a repository

Ross Burton (1):
  kconfig-frontends: fix build race

 meta-selftest/wic/test_generic_efi.wks.in  |   9 +
 meta/classes/cmake.bbclass |   9 +-
 meta/classes/grub-efi.bbclass  |  14 +-
 meta/classes/image_types_wic.bbclass   |  87 +--
 meta/classes/systemd-boot.bbclass  |   8 +
 meta/lib/oeqa/selftest/wic.py  |  59 -
 meta/lib/oeqa/utils/git.py |   2 +-
 ...-mfpmath-sse-as-well-when-SSE-is-disabled.patch |   0
 ...nforce-no-pie-if-the-compiler-supports-it.patch |  45 
 ...E-2015-8370-Grub2-user-pass-vulnerability.patch |  53 -
 ...ct-_llseek-code-and-require-long-filesyst.patch |  81 ---
 ...Use-AC_HEADER_MAJOR-to-find-device-macros.patch |  92 
 ...ettext-gettext.c-main_context-secondary_c.patch |  39 
 ...ern-efi-mm.c-grub_efi_finish_boot_service.patch |  79 ---
 ...1-grub.d-10_linux.in-add-oe-s-kernel-name.patch |   0
 ..._dhcp_vendor-Add-missing-const-qualifiers.patch |  33 ---
 ...ern-efi-mm.c-grub_efi_get_memory_map-Neve.patch |  43 
 .../{grub => files}/autogen.sh-exclude-pc.patch|   0
 .../grub/files/check-if-liblzma-is-disabled.patch  |  33 ---
 .../grub/files/fix-endianness-problem.patch|  44 
 .../grub/files/fix-issue-with-flex-2.5.37.patch|  21 --
 meta/recipes-bsp/grub/files/fix-texinfo.patch  |  32 ---
 .../grub/files/grub-2.00-add-oe-kernel.patch   |  53 -
 .../grub-2.00-fix-enable_execute_stack-check.patch |  27 ---
 .../grub/files/grub-2.00-fpmath-sse-387-fix.patch  |  24 --
 ...allow-a-compilation-without-mcmodel-large.patch | 131 ---
 .../grub/files/grub-efi-fix-with-glibc-2.20.patch  |  32 ---
 meta/recipes-bsp/grub/files/grub-install.in.patch  |  20 --
 .../grub/files/grub-no-unused-result.patch |  19 --
 .../grub/files/grub2-fix-initrd-size-bug.patch |  48 
 ...rub2-remove-sparc64-setup-from-x86-builds.patch |  44 
 

Re: [OE-core] [PATCH 1/2] conf/bitbake.conf: include ed in hosttools

2017-05-19 Thread Anders Darander
* Khem Raj  [170519 01:17]:

> On Thu, May 18, 2017 at 4:12 PM, Richard Purdie
>  wrote:
> > On Thu, 2017-05-18 at 17:28 -0500, Jose Lamego wrote:
> >> Some recipes build fail due to missing ed command.

> >> This change includes ed to the hosttools required to
> >> run builds with oe-core.

> >> Signed-off-by: Jose Lamego 
> >> Signed-off-by: Leonardo Sandoval  >> tel.com>

> > We really don't want to add ed here. Which recipes are failing and why
> > do we need ed to build them?

> we also need whoami which kernel uses to identify the build user id


No, we don't want to add whoami...

As fas as I can (in a recent kernel), whoami is only used in
scripts/mkcompile_h. And there, it's only used if $KBUILD_BUILD_USER is
empty. I'd rather see that we set $KBUILD_BUILD_USER to something
deterministic in our kernel.bbclass.

Cheers,
Anders

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


[OE-core] [PATCH 2/2] dhcp: build shared libraries

2017-05-19 Thread kai.kang
From: Kai Kang 

When enable bind threads support, it fails to compile dhcp:

| 
tmp/work/armv5e-poky-linux-gnueabi/bind/9.10.3-P3-r0/build/lib/isc/pthreads/../../../
| ../bind-9.10.3-P3/lib/isc/pthreads/thread.c:64: undefined reference to 
`pthread_create'

Enable build shared libraries for bind and dhcp to fix the build
failure. And the patch is ported from Fedora.

Add sub-package dhcp-libs to package shared libraries.

Signed-off-by: Kai Kang 
---
 meta/recipes-connectivity/dhcp/dhcp.inc|   6 +-
 .../dhcp/dhcp/build-shared-libs.patch  | 186 +
 meta/recipes-connectivity/dhcp/dhcp_4.3.5.bb   |   1 +
 3 files changed, 191 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-connectivity/dhcp/dhcp/build-shared-libs.patch

diff --git a/meta/recipes-connectivity/dhcp/dhcp.inc 
b/meta/recipes-connectivity/dhcp/dhcp.inc
index aafdd0a..969fdcb 100644
--- a/meta/recipes-connectivity/dhcp/dhcp.inc
+++ b/meta/recipes-connectivity/dhcp/dhcp.inc
@@ -46,7 +46,7 @@ EXTRA_OECONF = 
"--with-srv-lease-file=${localstatedir}/lib/dhcp/dhcpd.leases \
 
--with-cli-lease-file=${localstatedir}/lib/dhcp/dhclient.leases \
 
--with-cli6-lease-file=${localstatedir}/lib/dhcp/dhclient6.leases \
 --with-libbind=${STAGING_LIBDIR}/ \
---enable-paranoia \
+--enable-paranoia --disable-static \
 --with-randomdev=/dev/random \
"
 
@@ -82,12 +82,14 @@ do_install_append () {
sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' 
${D}${systemd_unitdir}/system/dhcrelay.service
 }
 
-PACKAGES += "dhcp-server dhcp-server-config dhcp-client dhcp-relay 
dhcp-omshell"
+PACKAGES += "dhcp-libs dhcp-server dhcp-server-config dhcp-client dhcp-relay 
dhcp-omshell"
 
 FILES_${PN} = ""
 RDEPENDS_${PN}-dev = ""
 RDEPENDS_${PN}-staticdev = ""
 
+FILES_${PN}-libs = "${libdir}/libdhcpctl.so.0* ${libdir}/libomapi.so.0*"
+
 FILES_${PN}-server = "${sbindir}/dhcpd ${sysconfdir}/init.d/dhcp-server"
 RRECOMMENDS_${PN}-server = "dhcp-server-config"
 
diff --git a/meta/recipes-connectivity/dhcp/dhcp/build-shared-libs.patch 
b/meta/recipes-connectivity/dhcp/dhcp/build-shared-libs.patch
new file mode 100644
index 000..0b3d6e4
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp/build-shared-libs.patch
@@ -0,0 +1,186 @@
+Upstream-Status: Pending
+
+Port patches from Fedora to build shared libs rather than static libs.
+
+Signed-off-by: Kai Kang 
+---
+diff --git a/client/Makefile.am b/client/Makefile.am
+index 84d8131..e776bf0 100644
+--- a/client/Makefile.am
 b/client/Makefile.am
+@@ -15,7 +15,7 @@ dhclient_SOURCES = $(srcdir)/clparse.c $(srcdir)/dhclient.c 
$(srcdir)/dhc6.c \
+  scripts/bsdos scripts/freebsd scripts/linux scripts/macos \
+  scripts/netbsd scripts/nextstep scripts/openbsd \
+  scripts/solaris scripts/openwrt
+-dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a 
$(BINDLIBDIR)/libirs.a \
+-   $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a 
$(BINDLIBDIR)/libisc.a
++dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.la \
++-L$(BINDLIBDIR) -lirs -ldns -lisccfg -lisc
+ man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
+ EXTRA_DIST = $(man_MANS)
+diff --git a/common/tests/Makefile.am b/common/tests/Makefile.am
+index 05cd9c1..ab7a5a3 100644
+--- a/common/tests/Makefile.am
 b/common/tests/Makefile.am
+@@ -15,26 +15,23 @@ ATF_TESTS += alloc_unittest dns_unittest misc_unittest 
ns_name_unittest
+ alloc_unittest_SOURCES = test_alloc.c $(top_srcdir)/tests/t_api_dhcp.c
+ alloc_unittest_LDADD = $(ATF_LDFLAGS)
+ alloc_unittest_LDADD += ../libdhcp.a  \
+-  ../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
+-  $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a  $(BINDLIBDIR)/libisc.a
++  ../../omapip/libomapi.la -L$(BINDLIBDIR) -ldns -lisccfg -lisc
+ 
+ dns_unittest_SOURCES = dns_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
+ dns_unittest_LDADD = $(ATF_LDFLAGS)
+ dns_unittest_LDADD += ../libdhcp.a  \
+-  ../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
+-  $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a  $(BINDLIBDIR)/libisc.a
++  ../../omapip/libomapi.la -L$(BINDLIBDIR) -ldns -lisccfg -lisc
+ 
+ misc_unittest_SOURCES = misc_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
+ misc_unittest_LDADD = $(ATF_LDFLAGS)
+ misc_unittest_LDADD += ../libdhcp.a  \
+-  ../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
+-  $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a  $(BINDLIBDIR)/libisc.a
++  ../../omapip/libomapi.la -L$(BINDLIBDIR) -ldns -lisccfg -lisc
+ 
+ ns_name_unittest_SOURCES = ns_name_test.c $(top_srcdir)/tests/t_api_dhcp.c
+ ns_name_unittest_LDADD = $(ATF_LDFLAGS)
+ ns_name_unittest_LDADD += ../libdhcp.a  \
+-  ../../omapip/libomapi.a $(BINDLIBDIR)/libirs.a \
+-  

[OE-core] [PATCH 1/2] bind: build with threads and update configure options

2017-05-19 Thread kai.kang
From: Kai Kang 

Build without threads for bind is inherited from legacy openembedded.
All libc's support proper threading on Linux now, so enable threads
support for bind.

It is also need to disable static library build which cause package dhcp
fail to build after enable bind threads support.

Options devpoll and epoll are configured to choose most preferable
multiplex method for unix socket. The priorities are: epoll > poll >
select. When set '--enable-epoll', it just defines a var and include
header file that is available for cross compile. So use epoll for bind.

Add PACKAGECONFIG 'urandom' that could use /dev/urandom as random device.

Update file/directory ownerships to fix daemon start failure.

Signed-off-by: Kai Kang 
---
 meta/recipes-connectivity/bind/bind/generate-rndc-key.sh |  1 +
 meta/recipes-connectivity/bind/bind_9.10.3-P3.bb | 10 --
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-connectivity/bind/bind/generate-rndc-key.sh 
b/meta/recipes-connectivity/bind/bind/generate-rndc-key.sh
index db20127..ef915c0 100644
--- a/meta/recipes-connectivity/bind/bind/generate-rndc-key.sh
+++ b/meta/recipes-connectivity/bind/bind/generate-rndc-key.sh
@@ -3,5 +3,6 @@
 if [ ! -s /etc/bind/rndc.key ]; then
 echo -n "Generating /etc/bind/rndc.key:"
 /usr/sbin/rndc-confgen -a -b 512 -r /dev/urandom
+chown root:bind /etc/bind/rndc.key
 chmod 0640 /etc/bind/rndc.key
 fi
diff --git a/meta/recipes-connectivity/bind/bind_9.10.3-P3.bb 
b/meta/recipes-connectivity/bind/bind_9.10.3-P3.bb
index 18249f2..7eb79b0 100644
--- a/meta/recipes-connectivity/bind/bind_9.10.3-P3.bb
+++ b/meta/recipes-connectivity/bind/bind_9.10.3-P3.bb
@@ -38,8 +38,8 @@ SRC_URI[md5sum] = "bcf7e772b616f7259420a3edc5df350a"
 SRC_URI[sha256sum] = 
"690810d1fbb72afa629e74638d19cd44e28d2b2e5eb63f55c705ad85d1a4cb83"
 
 ENABLE_IPV6 = "--enable-ipv6=${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 
'yes', 'no', d)}"
-EXTRA_OECONF = " ${ENABLE_IPV6} --with-randomdev=/dev/random --disable-threads 
\
- --disable-devpoll --disable-epoll --with-gost=no \
+EXTRA_OECONF = " ${ENABLE_IPV6} --with-libtool --enable-threads \
+ --disable-devpoll --enable-epoll --with-gost=no \
  --with-gssapi=no --with-ecdsa=yes \
  --sysconfdir=${sysconfdir}/bind \
  --with-openssl=${STAGING_LIBDIR}/.. \
@@ -51,6 +51,7 @@ PACKAGECONFIG ?= "readline"
 PACKAGECONFIG[httpstats] = "--with-libxml2,--without-libxml2,libxml2"
 PACKAGECONFIG[readline] = "--with-readline=-lreadline,,readline"
 PACKAGECONFIG[libedit] = "--with-readline=-ledit,,libedit"
+PACKAGECONFIG[urandom] = 
"--with-randomdev=/dev/urandom,--with-randomdev=/dev/random,,"
 
 USERADD_PACKAGES = "${PN}"
 USERADD_PARAM_${PN} = "--system --home ${localstatedir}/cache/bind 
--no-create-home \
@@ -101,6 +102,11 @@ do_install_append() {
 
install -d ${D}${sysconfdir}/default
install -m 0644 ${WORKDIR}/bind9 ${D}${sysconfdir}/default
+
+   if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', 
d)}; then
+   install -d ${D}${sysconfdir}/tmpfiles.d
+   echo "d /run/named 0755 bind bind - -" > 
${D}${sysconfdir}/tmpfiles.d/bind.conf
+   fi
 }
 
 CONFFILES_${PN} = " \
-- 
2.10.1

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


[OE-core] [PATCH 0/2] Build bind with threads

2017-05-19 Thread kai.kang
From: Kai Kang 

The following changes since commit ef506f58da3a95fba2696df749b2b81f9c118847:

  cve-check-tool: backport a patch to make CVE checking work (2017-05-18 
14:01:48 +0100)

are available in the git repository at:

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

Kai Kang (2):
  bind: build with threads and update configure options
  dhcp: build shared libraries

 .../bind/bind/generate-rndc-key.sh |   1 +
 meta/recipes-connectivity/bind/bind_9.10.3-P3.bb   |  10 +-
 meta/recipes-connectivity/dhcp/dhcp.inc|   6 +-
 .../dhcp/dhcp/build-shared-libs.patch  | 186 +
 meta/recipes-connectivity/dhcp/dhcp_4.3.5.bb   |   1 +
 5 files changed, 200 insertions(+), 4 deletions(-)
 create mode 100644 meta/recipes-connectivity/dhcp/dhcp/build-shared-libs.patch

-- 
2.10.1

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


[OE-core] [PATCH] Fix return value checks from subprocess.call()'s

2017-05-19 Thread Mikko Rapeli
Python function subprocess.call() returns the return value of the
executed process. If return values are not checked, errors may
go unnoticed and bad things can happen.

Change all callers of subprocess.call() which do not check for
the return value to use subprocess.check_call() which raises
CalledProcessError if the subprocess returns with non-zero value.

https://docs.python.org/2/library/subprocess.html#using-the-subprocess-module

All users of the function were found with:

$ git grep "subprocess\.call" | \
  egrep -v 'if.*subprocess\.call|=\ +subprocess\.call|return.*subprocess\.call'

Tested similar patch on top of jethro. Only compile tested core-image-minimal
on poky master branch.

Signed-off-by: Mikko Rapeli 
---
 bitbake/lib/bb/ui/ncurses.py | 2 +-
 bitbake/lib/bb/utils.py  | 2 +-
 meta/classes/archiver.bbclass| 2 +-
 meta/classes/cml1.bbclass| 2 +-
 meta/classes/kernel-module-split.bbclass | 2 +-
 meta/classes/sstate.bbclass  | 4 ++--
 meta/lib/oeqa/utils/buildproject.py  | 2 +-
 meta/lib/oeqa/utils/targetbuild.py   | 4 ++--
 meta/recipes-extended/cups/cups.inc  | 2 +-
 scripts/runqemu  | 8 
 10 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/bitbake/lib/bb/ui/ncurses.py b/bitbake/lib/bb/ui/ncurses.py
index d81e413..ca845a3 100644
--- a/bitbake/lib/bb/ui/ncurses.py
+++ b/bitbake/lib/bb/ui/ncurses.py
@@ -297,7 +297,7 @@ class NCursesUI:
 #bb.error("log data follows (%s)" % logfile)
 #number_of_lines = 
data.getVar("BBINCLUDELOGS_LINES", d)
 #if number_of_lines:
-#subprocess.call('tail -n%s %s' % 
(number_of_lines, logfile), shell=True)
+#subprocess.check_call('tail -n%s %s' % 
(number_of_lines, logfile), shell=True)
 #else:
 #f = open(logfile, "r")
 #while True:
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index 077fddc..6a44db5 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -680,7 +680,7 @@ def remove(path, recurse=False):
 if _check_unsafe_delete_path(path):
 raise Exception('bb.utils.remove: called with dangerous path 
"%s" and recurse=True, refusing to delete!' % path)
 # shutil.rmtree(name) would be ideal but its too slow
-subprocess.call(['rm', '-rf'] + glob.glob(path))
+subprocess.check_call(['rm', '-rf'] + glob.glob(path))
 return
 for name in glob.glob(path):
 try:
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 2c04557..703eacb 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -288,7 +288,7 @@ def create_diff_gz(d, src_orig, src, ar_outdir):
 os.chdir(dirname)
 out_file = os.path.join(ar_outdir, '%s-diff.gz' % d.getVar('PF'))
 diff_cmd = 'diff -Naur %s.orig %s.patched | gzip -c > %s' % (basename, 
basename, out_file)
-subprocess.call(diff_cmd, shell=True)
+subprocess.check_call(diff_cmd, shell=True)
 bb.utils.remove(src_patched, recurse=True)
 
 # Run do_unpack and do_patch
diff --git a/meta/classes/cml1.bbclass b/meta/classes/cml1.bbclass
index 38e6613..eb8e790 100644
--- a/meta/classes/cml1.bbclass
+++ b/meta/classes/cml1.bbclass
@@ -63,7 +63,7 @@ python do_diffconfig() {
 
 if isdiff:
 statement = 'diff --unchanged-line-format= --old-line-format= 
--new-line-format="%L" ' + configorig + ' ' + config + '>' + fragment
-subprocess.call(statement, shell=True)
+subprocess.check_call(statement, shell=True)
 
 shutil.copy(configorig, config)
 
diff --git a/meta/classes/kernel-module-split.bbclass 
b/meta/classes/kernel-module-split.bbclass
index 5e10dcf..1035525 100644
--- a/meta/classes/kernel-module-split.bbclass
+++ b/meta/classes/kernel-module-split.bbclass
@@ -47,7 +47,7 @@ python split_kernel_module_packages () {
 tf = tempfile.mkstemp()
 tmpfile = tf[1]
 cmd = "%sobjcopy -j .modinfo -O binary %s %s" % 
(d.getVar("HOST_PREFIX") or "", file, tmpfile)
-subprocess.call(cmd, shell=True)
+subprocess.check_call(cmd, shell=True)
 f = open(tmpfile)
 l = f.read().split("\000")
 f.close()
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 0a12935..f446c3d 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -404,7 +404,7 @@ python sstate_hardcode_path_unpack () {
 return
 
 bb.note("Replacing fixme paths in sstate package: %s" % 
(sstate_hardcode_cmd))
-subprocess.call(sstate_hardcode_cmd, shell=True)
+subprocess.check_call(sstate_hardcode_cmd, shell=True)
 
 # Need to remove this or we'd copy it into the target directory