[OE-core] [PATCH 3/6] gstreamer1.0-plugins-good_git: update 1.7.1 -> 1.7.2

2016-02-19 Thread Andre McCurdy
Signed-off-by: Andre McCurdy 
---
 ...itialized-warnings-when-compiling-with-Os.patch | 41 --
 .../gstreamer/gstreamer1.0-plugins-good_git.bb |  8 ++---
 2 files changed, 4 insertions(+), 45 deletions(-)
 delete mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch
deleted file mode 100644
index 59addae..000
--- 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 63a838d9ae2be480be8d28d6f51762d288b2a54a Mon Sep 17 00:00:00 2001
-From: Andre McCurdy 
-Date: Tue, 26 Jan 2016 14:47:36 -0800
-Subject: [PATCH] fix maybe-uninitialized warnings when compiling with -Os
-
-Upstream-Status: Pending
-
-Signed-off-by: Andre McCurdy 

- gst/isomp4/qtdemux.c| 1 +
- gst/rtp/gstrtph261pay.c | 2 +-
- 2 files changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
-index 77bb73e..1fc60ac 100644
 a/gst/isomp4/qtdemux.c
-+++ b/gst/isomp4/qtdemux.c
-@@ -3269,6 +3269,7 @@ qtdemux_parse_cenc_aux_info (GstQTDemux * qtdemux, 
QtDemuxStream * stream,
- gst_structure_set (properties, "iv", GST_TYPE_BUFFER, buf, NULL);
- size = info_sizes[i];
- if (size > iv_size) {
-+  n_subsamples = 0;
-   if (!gst_byte_reader_get_uint16_be (br, _subsamples)
-   || !(n_subsamples > 0)) {
- gst_structure_free (properties);
-diff --git a/gst/rtp/gstrtph261pay.c b/gst/rtp/gstrtph261pay.c
-index 7cdd323..ebcf80e 100644
 a/gst/rtp/gstrtph261pay.c
-+++ b/gst/rtp/gstrtph261pay.c
-@@ -867,7 +867,7 @@ gst_rtp_h261_packetize_and_push (GstRtpH261Pay * pay, 
GstBuffer * buffer,
-   gst_rtp_buffer_calc_payload_len (GST_RTP_BASE_PAYLOAD_MTU (pay) -
-   GST_RTP_H261_PAYLOAD_HEADER_LEN, 0, 0);
-   guint startpos;
--  gint num_gobs;
-+  gint num_gobs = 0;
-   Gob gobs[MAX_NUM_GOB];
-   Gob *gob;
-   Macroblock last_mb_in_previous_packet = { 0 };
--- 
-1.9.1
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb
index e3a2019..9cadc9a 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb
@@ -9,16 +9,16 @@ LIC_FILES_CHKSUM = 
"file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
 SRC_URI = " \
 git://anongit.freedesktop.org/gstreamer/gst-plugins-good;name=base \
 
git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common
 \
-file://fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch \
 file://avoid-including-sys-poll.h-directly.patch \
 file://ensure-valid-sentinel-for-gst_structure_get.patch \
 "
 
-PV = "1.7.1+git${SRCPV}"
+PV = "1.7.2+git${SRCPV}"
+
 UPSTREAM_CHECK_GITTAGREGEX = "(?P(\d+(\.\d+)+))"
 
-SRCREV_base = "e016a70a7c97fc61c6cb5cd3821d38bc5ae5c9a4"
-SRCREV_common = "86e46630ed8af8d94796859db550a9c3d89c9f65"
+SRCREV_base = "1b6fdce67c15d59957e395b1957aa625322092d4"
+SRCREV_common = "b64f03f6090245624608beb5d2fff335e23a01c0"
 SRCREV_FORMAT = "base"
 
 S = "${WORKDIR}/git"
-- 
1.9.1

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


[OE-core] [PATCH 1/6] gstreamer1.0_git: update 1.7.1 -> 1.7.2

2016-02-19 Thread Andre McCurdy
Signed-off-by: Andre McCurdy 
---
 meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb | 12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb
index cb55c9a..7715bb2 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb
@@ -10,15 +10,21 @@ SRC_URI = " \
 
git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common
 \
 "
 
-PV = "1.7.1+git${SRCPV}"
+PV = "1.7.2+git${SRCPV}"
+
 UPSTREAM_CHECK_GITTAGREGEX = "(?P(\d+(\.\d+)+))"
 
-SRCREV_base = "2a188848eb2af3c3b357978ff7786a78aad9dd55"
-SRCREV_common = "86e46630ed8af8d94796859db550a9c3d89c9f65"
+SRCREV_base = "9e33bfa2c7a5f43da2c49b0a8235fd43cba9feaf"
+SRCREV_common = "b64f03f6090245624608beb5d2fff335e23a01c0"
 SRCREV_FORMAT = "base"
 
 S = "${WORKDIR}/git"
 
+# The option to configure tracer hooks was added prior to the 1.7.2 release
+# 
https://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=e5ca47236e4df4683707f0bcf99181a937d358d5
+PACKAGECONFIG[gst-tracer-hooks] = 
"--enable-gst-tracer-hooks,--disable-gst-tracer-hooks,"
+PACKAGECONFIG[trace-historic] = "--enable-trace,--disable-trace,"
+
 do_configure_prepend() {
${S}/autogen.sh --noconfigure
 }
-- 
1.9.1

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


[OE-core] [PATCH 2/6] gstreamer1.0-plugins-base_git: update 1.7.1 -> 1.7.2

2016-02-19 Thread Andre McCurdy
Signed-off-by: Andre McCurdy 
---
 .../gstreamer/gstreamer1.0-plugins-base_git.bb| 11 ---
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb
index a07c35b..38a9fcc 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb
@@ -12,19 +12,16 @@ SRC_URI = " \
 file://make-gio_unix_2_0-dependency-configurable.patch \
 "
 
-PV = "1.7.1+git${SRCPV}"
+PV = "1.7.2+git${SRCPV}"
+
 UPSTREAM_CHECK_GITTAGREGEX = "(?P(\d+(\.\d+)+))"
 
-SRCREV_base = "641428966e09d16b0a46540040f2faf3791eb7c9"
-SRCREV_common = "86e46630ed8af8d94796859db550a9c3d89c9f65"
+SRCREV_base = "97e108bebaa58821f4566a74cbf0135e93407c01"
+SRCREV_common = "b64f03f6090245624608beb5d2fff335e23a01c0"
 SRCREV_FORMAT = "base"
 
 S = "${WORKDIR}/git"
 
 do_configure_prepend() {
-
-   # Temp solution for git snapshot: relax version checks so we can build 
against GStreamer 1.7.1
-   sed 's/^GST_REQ=1\.7\.1\.1/GST_REQ=1.7.1/' -i ${S}/configure.ac
-
${S}/autogen.sh --noconfigure
 }
-- 
1.9.1

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


[OE-core] [PATCH 6/6] gstreamer1.0-libav_git: update 1.7.1 -> 1.7.2

2016-02-19 Thread Andre McCurdy
Hash for libav LICENSE.md updated due to dropping libaacplus:

  
https://github.com/FFmpeg/FFmpeg/commit/9ba54c1b82a81581e5283da75c153a76f04324c0

Signed-off-by: Andre McCurdy 
---
 meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb | 13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb
index 4cd51cd..1957a5a 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb
@@ -5,7 +5,7 @@ include gstreamer1.0-libav.inc
 LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
 file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \
 
file://ext/libav/gstav.h;beginline=1;endline=18;md5=a752c35267d8276fd9ca3db6994fca9c
 \
-
file://gst-libs/ext/libav/LICENSE.md;md5=5c6d1ed56d15ca87ddec48d0c3a2051d \
+
file://gst-libs/ext/libav/LICENSE.md;md5=acda96fe91ccaabc9cd9d541806a0d37 \
 
file://gst-libs/ext/libav/COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
 
file://gst-libs/ext/libav/COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
 
file://gst-libs/ext/libav/COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 
\
@@ -17,17 +17,18 @@ LIC_FILES_CHKSUM = 
"file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
 SRC_URI = " \
 git://anongit.freedesktop.org/gstreamer/gst-libav;name=base \
 
git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common
 \
-
git://source.ffmpeg.org/ffmpeg;destsuffix=git/gst-libs/ext/libav;name=ffmpeg;branch=release/2.8
 \
+
git://source.ffmpeg.org/ffmpeg;destsuffix=git/gst-libs/ext/libav;name=ffmpeg;branch=release/3.0
 \
 file://0001-Disable-yasm-for-libav-when-disable-yasm.patch \
 file://workaround-to-build-gst-libav-for-i586-with-gcc.patch \
 "
 
-PV = "1.7.1+git${SRCPV}"
+PV = "1.7.2+git${SRCPV}"
+
 UPSTREAM_CHECK_GITTAGREGEX = "(?P(\d+(\.\d+)+))"
 
-SRCREV_base = "0993ec8fa5cf6b09e33741f268c938719a1534d5"
-SRCREV_common = "86e46630ed8af8d94796859db550a9c3d89c9f65"
-SRCREV_ffmpeg = "644179e0d4155ae8f5ddd5c3f6bd003e2e13cf94"
+SRCREV_base = "6c4878b6abc916b7f6f25b8926c4859119acf1ec"
+SRCREV_common = "b64f03f6090245624608beb5d2fff335e23a01c0"
+SRCREV_ffmpeg = "c40983a6f631d22fede713d535bb9c31d5c9740c"
 SRCREV_FORMAT = "base"
 
 S = "${WORKDIR}/git"
-- 
1.9.1

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


[OE-core] [PATCH 4/6] gstreamer1.0-plugins-bad_git: update 1.7.1 -> 1.7.2

2016-02-19 Thread Andre McCurdy
Signed-off-by: Andre McCurdy 
---
 .../gstreamer/gstreamer1.0-plugins-bad.inc |  2 -
 ...valid-sentinels-for-gst_structure_get-etc.patch | 51 +++---
 .../gstreamer/gstreamer1.0-plugins-bad_1.6.3.bb| 10 +
 .../gstreamer/gstreamer1.0-plugins-bad_git.bb  | 21 +++--
 4 files changed, 63 insertions(+), 21 deletions(-)

diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
index c4199bd..cb6cbad 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
@@ -37,7 +37,6 @@ PACKAGECONFIG[hls] = 
"--enable-hls,--disable-hls,nettle"
 PACKAGECONFIG[libmms]  = "--enable-libmms,--disable-libmms,libmms"
 PACKAGECONFIG[libssh2] = "--enable-libssh2,--disable-libssh2,libssh2"
 PACKAGECONFIG[modplug] = 
"--enable-modplug,--disable-modplug,libmodplug"
-PACKAGECONFIG[mpg123]  = "--enable-mpg123,--disable-mpg123,mpg123"
 PACKAGECONFIG[neon]= "--enable-neon,--disable-neon,neon"
 PACKAGECONFIG[openal]  = "--enable-openal,--disable-openal,openal-soft"
 PACKAGECONFIG[opencv]  = "--enable-opencv,--disable-opencv,opencv"
@@ -93,7 +92,6 @@ EXTRA_OECONF += " \
 --disable-directsound \
 --disable-dts \
 --disable-gme \
---disable-gsettings \
 --disable-gsm \
 --disable-kate \
 --disable-ladspa \
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch
index 8ccaaa0..369ff93 100644
--- 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch
@@ -1,4 +1,4 @@
-From 3164f23cd6ae338d0e423fccb4e11539cd220e2f Mon Sep 17 00:00:00 2001
+From 2262ba4b686d5cc0d3e894707fe1d31619a3a8f1 Mon Sep 17 00:00:00 2001
 From: Andre McCurdy 
 Date: Tue, 9 Feb 2016 14:00:00 -0800
 Subject: [PATCH] ensure valid sentinals for gst_structure_get() etc
@@ -18,26 +18,45 @@ Upstream-Status: Pending
 
 Signed-off-by: Andre McCurdy 
 ---
- sys/decklink/gstdecklink.cpp  | 2 +-
- sys/decklink/gstdecklinkaudiosrc.cpp  | 2 +-
- sys/decklink/gstdecklinkvideosink.cpp | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
+ sys/decklink/gstdecklink.cpp  | 10 +-
+ sys/decklink/gstdecklinkaudiosrc.cpp  |  2 +-
+ sys/decklink/gstdecklinkvideosink.cpp |  2 +-
+ 3 files changed, 7 insertions(+), 7 deletions(-)
 
 diff --git a/sys/decklink/gstdecklink.cpp b/sys/decklink/gstdecklink.cpp
-index c0d1128..6f2ef75 100644
+index 64637f1..bac956f 100644
 --- a/sys/decklink/gstdecklink.cpp
 +++ b/sys/decklink/gstdecklink.cpp
-@@ -328,7 +328,7 @@ gst_decklink_mode_get_structure (GstDecklinkModeEnum e)
-   "interlace-mode", G_TYPE_STRING,
-   mode->interlaced ? "interleaved" : "progressive", "pixel-aspect-ratio",
-   GST_TYPE_FRACTION, mode->par_n, mode->par_d, "colorimetry", 
G_TYPE_STRING,
--  mode->colorimetry, "chroma-site", G_TYPE_STRING, "mpeg2", NULL);
-+  mode->colorimetry, "chroma-site", G_TYPE_STRING, "mpeg2", (void *) 
NULL);
- }
+@@ -324,22 +324,22 @@ gst_decklink_mode_get_structure (GstDecklinkModeEnum e, 
BMDPixelFormat f)
+   "height", G_TYPE_INT, mode->height,
+   "pixel-aspect-ratio", GST_TYPE_FRACTION, mode->par_n, mode->par_d,
+   "interlace-mode", G_TYPE_STRING, mode->interlaced ? "interleaved" : 
"progressive",
+-  "framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d, NULL);
++  "framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d, (void *) 
NULL);
  
- GstCaps *
+   switch (f) {
+ case bmdFormat8BitYUV: /* '2vuy' */
+   gst_structure_set (s, "format", G_TYPE_STRING, "UYVY",
+   "colorimetry", G_TYPE_STRING, mode->colorimetry,
+-  "chroma-site", G_TYPE_STRING, "mpeg2", NULL);
++  "chroma-site", G_TYPE_STRING, "mpeg2", (void *) NULL);
+   break;
+ case bmdFormat10BitYUV: /* 'v210' */
+-  gst_structure_set (s, "format", G_TYPE_STRING, "v210", NULL);
++  gst_structure_set (s, "format", G_TYPE_STRING, "v210", (void *) NULL);
+   break;
+ case bmdFormat8BitARGB: /* 'ARGB' */
+-  gst_structure_set (s, "format", G_TYPE_STRING, "ARGB", NULL);
++  gst_structure_set (s, "format", G_TYPE_STRING, "ARGB", (void *) NULL);
+   break;
+ case bmdFormat8BitBGRA: /* 'BGRA' */
+-  gst_structure_set (s, "format", G_TYPE_STRING, "BGRA", NULL);
++  gst_structure_set (s, "format", G_TYPE_STRING, "BGRA", (void *) NULL);
+   break;
+ case bmdFormat10BitRGB: /* 'r210' Big-endian RGB 10-bit per component 

[OE-core] [PATCH 5/6] gstreamer1.0-plugins-ugly_git: update 1.7.1 -> 1.7.2

2016-02-19 Thread Andre McCurdy
Signed-off-by: Andre McCurdy 
---
 .../gstreamer/gstreamer1.0-plugins-ugly_git.bb | 23 +++---
 1 file changed, 20 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb
index ccf6ece..69afe4c 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb
@@ -10,15 +10,32 @@ SRC_URI = " \
 
git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common
 \
 "
 
-PV = "1.7.1+git${SRCPV}"
+PV = "1.7.2+git${SRCPV}"
+
 UPSTREAM_CHECK_GITTAGREGEX = "(?P(\d+(\.\d+)+))"
 
-SRCREV_base = "c9c37983babad909d01c1c4c417d42a0cf252c1d"
-SRCREV_common = "86e46630ed8af8d94796859db550a9c3d89c9f65"
+SRCREV_base = "8bdb68edbc605e21314b608e7a39bdbaab7302b8"
+SRCREV_common = "b64f03f6090245624608beb5d2fff335e23a01c0"
 SRCREV_FORMAT = "base"
 
 S = "${WORKDIR}/git"
 
+# The mpg123 plugin was added prior to the 1.7.2 release
+# 
https://cgit.freedesktop.org/gstreamer/gst-plugins-ugly/commit/?id=43bd45ba991ef3247957ca37cdcb52f4b8c0acb1
+PACKAGECONFIG[mpg123] = "--enable-mpg123,--disable-mpg123,mpg123"
+
 do_configure_prepend() {
${S}/autogen.sh --noconfigure
 }
+
+# In 1.7.2, the mpg123 plugin was moved from -bad to -ugly
+# 
https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=08d8aefcdaaf89ecb6dd53ec1e4f95cd42d01664
+# 
https://cgit.freedesktop.org/gstreamer/gst-plugins-ugly/commit/?id=43bd45ba991ef3247957ca37cdcb52f4b8c0acb1
+
+PACKAGESPLITFUNCS_append = " handle_mpg123_rename "
+
+python handle_mpg123_rename () {
+d.setVar('RPROVIDES_gstreamer1.0-plugins-ugly-mpg123', 
'gstreamer1.0-plugins-bad-mpg123')
+d.setVar('RREPLACES_gstreamer1.0-plugins-ugly-mpg123', 
'gstreamer1.0-plugins-bad-mpg123')
+d.setVar('RCONFLICTS_gstreamer1.0-plugins-ugly-mpg123', 
'gstreamer1.0-plugins-bad-mpg123')
+}
-- 
1.9.1

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


[OE-core] [PATCH 0/6] update gstreamer1.0 git recipes 1.7.1 -> 1.7.2

2016-02-19 Thread Andre McCurdy
Minimal testing only (ie it builds OK in my distro and the Qt 5.4
browser demo can still play youtube videos using the libav plugin).

Andre McCurdy (6):
  gstreamer1.0_git: update 1.7.1 -> 1.7.2
  gstreamer1.0-plugins-base_git: update 1.7.1 -> 1.7.2
  gstreamer1.0-plugins-good_git: update 1.7.1 -> 1.7.2
  gstreamer1.0-plugins-bad_git: update 1.7.1 -> 1.7.2
  gstreamer1.0-plugins-ugly_git: update 1.7.1 -> 1.7.2
  gstreamer1.0-libav_git: update 1.7.1 -> 1.7.2

 .../gstreamer/gstreamer1.0-libav_git.bb| 13 +++---
 .../gstreamer/gstreamer1.0-plugins-bad.inc |  2 -
 ...valid-sentinels-for-gst_structure_get-etc.patch | 51 +++---
 .../gstreamer/gstreamer1.0-plugins-bad_1.6.3.bb| 10 +
 .../gstreamer/gstreamer1.0-plugins-bad_git.bb  | 21 +++--
 .../gstreamer/gstreamer1.0-plugins-base_git.bb | 11 ++---
 ...itialized-warnings-when-compiling-with-Os.patch | 41 -
 .../gstreamer/gstreamer1.0-plugins-good_git.bb |  8 ++--
 .../gstreamer/gstreamer1.0-plugins-ugly_git.bb | 23 --
 .../gstreamer/gstreamer1.0_git.bb  | 12 +++--
 10 files changed, 107 insertions(+), 85 deletions(-)
 delete mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch

-- 
1.9.1

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


[OE-core] [PATCH] buildstats.bbclass: Don't assume /proc//io present

2016-02-19 Thread Juro Bystricky
It is not guaranteed Linux kernel was configured with process I/O
statistics enabled. If process I/O statistcs are not present, issue
a one time warning and do not attempt to read the non-existing stats
counters.

[YOCTO#9025]

Signed-off-by: Juro Bystricky 
---
 meta/classes/buildstats.bbclass | 24 
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/meta/classes/buildstats.bbclass b/meta/classes/buildstats.bbclass
index e58d37b..72a3dd9 100644
--- a/meta/classes/buildstats.bbclass
+++ b/meta/classes/buildstats.bbclass
@@ -25,13 +25,14 @@ def get_process_cputime(pid):
 'cstime' : fields[16],  
 }
 iostats = {}
-with open("/proc/%d/io" % pid, "r") as f:
-while True:
-i = f.readline().strip()
-if not i:
-break
-i = i.split(": ")
-iostats[i[0]] = i[1]
+if os.path.isfile("/proc/%d/io" % pid):
+with open("/proc/%d/io" % pid, "r") as f:
+while True:
+i = f.readline().strip()
+if not i:
+break
+i = i.split(": ")
+iostats[i[0]] = i[1]
 resources = resource.getrusage(resource.RUSAGE_SELF)
 childres = resource.getrusage(resource.RUSAGE_CHILDREN)
 return stats, iostats, resources, childres
@@ -111,7 +112,14 @@ python run_buildstats () {
 
 if isinstance(e, bb.event.BuildStarted):
 

-# at first pass make the buildstats heriarchy and then
+# If the kernel was not configured to provide I/O statistics, issue
+# a one time warning.
+

+if not os.path.isfile("/proc/%d/io" % os.getpid()):
+bb.warn("The Linux kernel was not configured to provide process 
I/O statistics. (CONFIG_TASK_IO_ACCOUNTING is not set)")
+
+

+# at first pass make the buildstats hierarchy and then
 # set the buildname
 

 bb.utils.mkdirhier(bsdir)
-- 
1.9.1

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


[OE-core] [PATCH 0/1] Don't assume /proc//io present

2016-02-19 Thread Juro Bystricky
Latest enhancements to collect task statistics in the file
buildstats.bbclass also collect task I/O statistics using procfs interface.
However, it is not guaranteed the I/O counters are actually present. This 
depends
on how the kernel was configured. If the kernel was configured without
CONFIG_TASK_IO_ACCOUNTING=y, the corresponding procfs entries are missing.
This has been in fact observed in the wild (Build Appliance).
If we try to read the non-existent counters, we will basically hang bitbake.
The attached patch file checks for missing procfs entries and avoids
reading them if not present. 
Bitbake will also issue a one-time warning message at the start of a build.



Juro Bystricky (1):
  buildstats.bbclass: Don't assume /proc//io present

 meta/classes/buildstats.bbclass | 24 
 1 file changed, 16 insertions(+), 8 deletions(-)

-- 
1.9.1

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


Re: [OE-core] [PATCH v2 2/2] kernel: Make symbol link to vmlinuz in boot directory

2016-02-19 Thread Burton, Ross
On 19 February 2016 at 09:56,  wrote:

>  documentation/ref-manual/ref-tasks.xml|  8 
>  meta/classes/kernel.bbclass   | 13 -
>  meta/conf/documentation.conf  |  2 +-
>  meta/recipes-kernel/linux/linux-yocto.inc |  2 +-
>

documentation/ is actually a separate git repo (yocto-docs), please submit
a patch to yocto@ (with [yocto-docs] in the subject) when this patch is
merged into oe-core.

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


Re: [OE-core] [PATCHv2 2/2] oeqa/selftest/prservice: Added new TC: check pr-server starts and stop correctly on localhost.

2016-02-19 Thread Burton, Ross
On 19 February 2016 at 22:05, Francisco Pedraza <
francisco.j.pedraza.gonza...@intel.com> wrote:

> +runCmd('bitbake-prserv --host localhost --port %s
> --loglevel=DEBUG --start' % port)
> +ret = runCmd('bitbake-prserv --host localhost --port %s
> --loglevel=DEBUG --stop' % port)
> +
> +self.assertEqual(ret.status, 0)
>

Probably best to be defensive here and check that bitbake started correctly
too.

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


[OE-core] [PATCHv2 1/2] oeqa/utils: added new networke module

2016-02-19 Thread Francisco Pedraza
A network module was added, and will contain network utility funcions for now.
with get_free_port that returns availabe network port in the system.

Signed-off-by: Francisco Pedraza 
---
 meta/lib/oeqa/utils/network.py | 8 
 1 file changed, 8 insertions(+)
 create mode 100644 meta/lib/oeqa/utils/network.py

diff --git a/meta/lib/oeqa/utils/network.py b/meta/lib/oeqa/utils/network.py
new file mode 100644
index 000..2768f6c
--- /dev/null
+++ b/meta/lib/oeqa/utils/network.py
@@ -0,0 +1,8 @@
+import socket
+
+def get_free_port():
+s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+s.bind(('', 0))
+addr = s.getsockname()
+s.close()
+return addr[1]
-- 
2.5.0

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


[OE-core] [PATCHv2 2/2] oeqa/selftest/prservice: Added new TC: check pr-server starts and stop correctly on localhost.

2016-02-19 Thread Francisco Pedraza
This test case validates if prservice start and stop properly the server.
Using bitbake commands also validates the exit status.

[YOCTO #8258]

Signed-off-by: Francisco Pedraza 
---
 meta/lib/oeqa/selftest/prservice.py | 13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/selftest/prservice.py 
b/meta/lib/oeqa/selftest/prservice.py
index f22288e..66638de 100644
--- a/meta/lib/oeqa/selftest/prservice.py
+++ b/meta/lib/oeqa/selftest/prservice.py
@@ -9,9 +9,10 @@ import oeqa.utils.ftools as ftools
 from oeqa.selftest.base import oeSelfTest
 from oeqa.utils.commands import runCmd, bitbake, get_bb_var
 from oeqa.utils.decorators import testcase
+from oeqa.utils.network import get_free_port
 
 class BitbakePrTests(oeSelfTest):
-
+ 
 def get_pr_version(self, package_name):
 pkgdata_dir = get_bb_var('PKGDATA_DIR')
 package_data_file = os.path.join(pkgdata_dir, 'runtime', package_name)
@@ -119,3 +120,13 @@ class BitbakePrTests(oeSelfTest):
 @testcase(936)
 def test_pr_service_ipk_arch_indep(self):
 self.run_test_pr_service('xcursor-transparent-theme', 'ipk', 
'do_package')
+
+@testcase(1419)
+def test_stopping_prservice_message(self):
+port = get_free_port()
+
+runCmd('bitbake-prserv --host localhost --port %s --loglevel=DEBUG 
--start' % port)
+ret = runCmd('bitbake-prserv --host localhost --port %s 
--loglevel=DEBUG --stop' % port)
+
+self.assertEqual(ret.status, 0)
+
-- 
2.5.0

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


[OE-core] [PATCH v3 2/2] scripts/oe-selftest: Use site.USER_SITE to run coverage configuration code for sub-process

2016-02-19 Thread humberto . ibarra . lopez
From: Humberto Ibarra 

Coverage in oe-selftest currently requires to create or modify
a sitecustomize.py file according the coverage tool setup instructions
(http://coverage.readthedocs.org/). This file has to be located in
the system's python folder, which is not a good solution since this
folder is not accesible to non-privileged users.

The best solution so far is to create this file in the home directory.
This is implemented by creating the temporal file in the user site
default folder.

[Yocto #8930]

Signed-off-by: Humberto Ibarra 
---
 scripts/oe-selftest | 46 ++
 1 file changed, 34 insertions(+), 12 deletions(-)

diff --git a/scripts/oe-selftest b/scripts/oe-selftest
index f3865e4..bd9cbe0 100755
--- a/scripts/oe-selftest
+++ b/scripts/oe-selftest
@@ -553,6 +553,7 @@ def main():
 
 def buildResultClass(args):
 """Build a Result Class to use in the testcase execution"""
+import site
 
 class StampedResult(unittest.TextTestResult):
 """
@@ -568,26 +569,41 @@ def buildResultClass(args):
 
 def startTestRun(self):
 """ Setup coverage before running any testcase """
+
+# variable holding the coverage configuration file allowing 
subprocess to be measured
+self.coveragepth = None
+
+# indicates the system if coverage is currently installed
+self.coverage_installed = True
+
 if args.coverage or args.coverage_source or args.coverage_include 
or args.coverage_omit:
 try:
 # check if user can do coverage
 import coverage
-log.info("Coverage is enabled")
-
-# In case the user has not set the variable 
COVERAGE_PROCESS_START,
-# create a default one and export it. The 
COVERAGE_PROCESS_START
-# value indicates where the coverage configuration file 
resides
-# More info on https://pypi.python.org/pypi/coverage
-if not os.environ.get('COVERAGE_PROCESS_START'):
-os.environ['COVERAGE_PROCESS_START'] = 
coverage_setup(args.run_tests, args.run_all_tests, args.coverage_source, 
args.coverage_include, args.coverage_omit)
-
-self.coverage_installed = True
 except:
 log.warn('\n'.join(["python coverage is not installed",
 "Make sure your coverage takes into account 
sub-process",
 "More info on https://pypi.python.org/pypi/coverage;]))
 self.coverage_installed = False
 
+if self.coverage_installed:
+log.info("Coverage is enabled")
+
+# In case the user has not set the variable 
COVERAGE_PROCESS_START,
+# create a default one and export it. The 
COVERAGE_PROCESS_START
+# value indicates where the coverage configuration file resides
+# More info on https://pypi.python.org/pypi/coverage
+if not os.environ.get('COVERAGE_PROCESS_START'):
+os.environ['COVERAGE_PROCESS_START'] = 
coverage_setup(args.run_tests, args.run_all_tests, args.coverage_source, 
args.coverage_include, args.coverage_omit)
+
+# Use default site.USER_SITE and write corresponding config 
file
+site.ENABLE_USER_SITE = True
+if not os.path.exists(site.USER_SITE):
+os.makedirs(site.USER_SITE)
+self.coveragepth = os.path.join(site.USER_SITE, "coverage.pth")
+with open(self.coveragepth, 'w') as cps:
+cps.write('import sys,site; 
sys.path.extend(site.getsitepackages()); import coverage; 
coverage.process_startup();')
+
 def stopTestRun(self):
 """ Report coverage data after the testcases are run """
 
@@ -599,8 +615,14 @@ def buildResultClass(args):
 
 log.info("Coverage Report")
 log.info("===")
-
-coverage_report()
+try:
+coverage_report()
+# remove the pth file
+finally:
+try:
+os.remove(self.coveragepth)
+except OSError:
+log.warn("Expected temporal file from coverage is 
missing, ignoring removal.")
 
 return StampedResult
 
-- 
1.9.1

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


[OE-core] [PATCH v3 1/2] scripts/oe-selftest: Add filtering to the coverage data gathered by oe-selftest

2016-02-19 Thread humberto . ibarra . lopez
From: Humberto Ibarra 

When --coverage is used, oe-selftest gathers coverage data from the testcases
executed. The command lacks a way of filtering which files to gather coverage
data from.

This patch adds three options to specify which files should be considered.
The --coverage-source option specifies folders, while --coverage-include and
--coverage-omit specify patterns to have an extra level of filtering.

Some examples:

1. oe-selftest --run-all-tests --coverage

Gathers coverage data from the default poky folders

2. oe-selftest --run-all-tests --coverage --coverage-include 
/home/me/poky/scripts/*

Gathers coverage data only for the files located under '/home/me/poky/scripts'

3. oe-selftest --run-all-tests -coverage --coverage-omit /home/me/poky/meta*

Gathers coverage data. Files inside all the folders starting with 'meta' under
'/home/me/poky' are omited

4. oe-selftest --run-all-tests --coverage --coverage-source 
/home/me/poky/bitbake

Gathers coverage data only from files inside the folder: '/home/me/poky/bitbake'

[Yocto #8920]

Signed-off-by: Humberto Ibarra 
---
 scripts/oe-selftest | 32 +---
 1 file changed, 25 insertions(+), 7 deletions(-)

diff --git a/scripts/oe-selftest b/scripts/oe-selftest
index 4eb404b..f3865e4 100755
--- a/scripts/oe-selftest
+++ b/scripts/oe-selftest
@@ -78,6 +78,9 @@ def get_args_parser():
 group.add_argument('--list-modules', required=False, action="store_true", 
dest="list_modules", default=False, help='List all available test modules.')
 group.add_argument('--list-classes', required=False, action="store_true", 
dest="list_allclasses", default=False, help='List all available test classes.')
 parser.add_argument('--coverage', action="store_true", help="Run code 
coverage when testing")
+parser.add_argument('--coverage-source', dest="coverage_source", 
nargs="+", help="Specifiy the directories to take coverage from")
+parser.add_argument('--coverage-include', dest="coverage_include", 
nargs="+", help="Specify extra patterns to include into the coverage 
measurement")
+parser.add_argument('--coverage-omit', dest="coverage_omit", nargs="+", 
help="Specify with extra patterns to exclude from the coverage measurement")
 group.add_argument('--run-tests-by', required=False, dest='run_tests_by', 
default=False, nargs='*',
help='run-tests-by  ')
 group.add_argument('--list-tests-by', required=False, 
dest='list_tests_by', default=False, nargs='*',
@@ -369,7 +372,7 @@ def list_tags():
 
 print 'Tags:\t%s' % ', '.join(str(x) for x in tags)
 
-def coverage_setup(run_tests, run_all_tests):
+def coverage_setup(run_tests, run_all_tests, coverage_source, 
coverage_include, coverage_omit):
 """ Set up the coverage measurement for the testcases to be run """
 builddir = os.environ.get("BUILDDIR")
 coveragerc = "%s/.coveragerc" % builddir
@@ -384,10 +387,25 @@ def coverage_setup(run_tests, run_all_tests):
 cps.write("branch = True\n")
 # Measure just BBLAYERS, scripts and bitbake folders
 cps.write("source = \n")
-for layer in get_bb_var('BBLAYERS').split():
-cps.write("%s\n" % layer)
-cps.write("%s\n" % os.path.dirname(os.path.realpath(__file__)))
-cps.write("%s\n" % 
os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))),'bitbake'))
+if coverage_source:
+for directory in coverage_source:
+if not os.path.isdir(directory):
+log.warn("Directory %s is not valid.", directory)
+cps.write("%s\n" % directory)
+else:
+for layer in get_bb_var('BBLAYERS').split():
+cps.write("%s\n" % layer)
+cps.write("%s\n" % os.path.dirname(os.path.realpath(__file__)))
+cps.write("%s\n" % 
os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))),'bitbake'))
+
+if coverage_include:
+cps.write("include = \n")
+for pattern in coverage_include:
+cps.write("%s\n" % pattern)
+if coverage_omit:
+cps.write("omit = \n")
+for pattern in coverage_omit:
+cps.write("%s\n" % pattern)
 
 return coveragerc
 
@@ -550,7 +568,7 @@ def buildResultClass(args):
 
 def startTestRun(self):
 """ Setup coverage before running any testcase """
-if args.coverage:
+if args.coverage or args.coverage_source or args.coverage_include 
or args.coverage_omit:
 try:
 # check if user can do coverage
 import coverage
@@ -561,7 +579,7 @@ def buildResultClass(args):
 # value indicates where the coverage configuration file 
resides
 # More info on 

[OE-core] [PATCH v3 0/2] Coverage filtering and configuration file for sub-process in $HOME

2016-02-19 Thread humberto . ibarra . lopez
From: Humberto Ibarra 

Enables filtering to the files to be measured with coverage and adds temporal 
file to enable subprocessing

Humberto Ibarra (2):
  scripts/oe-selftest: Add filtering to the coverage data  gathered
by oe-selftest
  scripts/oe-selftest: Use site.USER_SITE to run coverage 
configuration code for sub-process

 scripts/oe-selftest | 76 -
 1 file changed, 58 insertions(+), 18 deletions(-)

-- 
1.9.1

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


[OE-core] [PATCH v2] signing-keys: Make signing keys the only publisher of keys

2016-02-19 Thread Randy Witt
Previously the keys were put into the os-release package. The package
indexing code was also deploying the keys rather than only using the keys.

This change makes signing-keys.bb the only publisher of the keys and also
uses standard tasks that already have sstate.

Signed-off-by: Randy Witt 
---
 meta/classes/sign_package_feed.bbclass |  9 +
 meta/classes/sign_rpm.bbclass  | 11 --
 meta/lib/oe/package_manager.py | 10 -
 meta/recipes-core/meta/signing-keys.bb | 61 +-
 meta/recipes-core/os-release/os-release.bb | 11 --
 5 files changed, 52 insertions(+), 50 deletions(-)

diff --git a/meta/classes/sign_package_feed.bbclass 
b/meta/classes/sign_package_feed.bbclass
index 63ca02f..e1ec82e 100644
--- a/meta/classes/sign_package_feed.bbclass
+++ b/meta/classes/sign_package_feed.bbclass
@@ -27,12 +27,7 @@ python () {
 for var in ('PACKAGE_FEED_GPG_NAME', 'PACKAGE_FEED_GPG_PASSPHRASE_FILE'):
 if not d.getVar(var, True):
 raise_sanity_error("You need to define %s in the config" % var, d)
-
-# Set expected location of the public key
-d.setVar('PACKAGE_FEED_GPG_PUBKEY',
- os.path.join(d.getVar('STAGING_ETCDIR_NATIVE', False),
-   'PACKAGE-FEED-GPG-PUBKEY'))
 }
 
-do_package_index[depends] += "signing-keys:do_export_public_keys"
-do_rootfs[depends] += "signing-keys:do_export_public_keys"
+do_package_index[depends] += "signing-keys:do_deploy"
+do_rootfs[depends] += "signing-keys:do_populate_sysroot"
diff --git a/meta/classes/sign_rpm.bbclass b/meta/classes/sign_rpm.bbclass
index 8b59bac..c21e3f0 100644
--- a/meta/classes/sign_rpm.bbclass
+++ b/meta/classes/sign_rpm.bbclass
@@ -28,8 +28,11 @@ python () {
 raise_sanity_error("You need to define %s in the config" % var, d)
 
 # Set the expected location of the public key
-d.setVar('RPM_GPG_PUBKEY', os.path.join(d.getVar('STAGING_ETCDIR_NATIVE', 
False),
-'RPM-GPG-PUBKEY'))
+d.setVar('RPM_GPG_PUBKEY', os.path.join(d.getVar('STAGING_DIR_TARGET', 
False),
+d.getVar('sysconfdir', False),
+'pki',
+'rpm-gpg',
+'RPM-GPG-KEY-${DISTRO_VERSION}'))
 }
 
 python sign_rpm () {
@@ -44,5 +47,5 @@ python sign_rpm () {
  d.getVar('RPM_GPG_PASSPHRASE_FILE', True))
 }
 
-do_package_index[depends] += "signing-keys:do_export_public_keys"
-do_rootfs[depends] += "signing-keys:do_export_public_keys"
+do_package_index[depends] += "signing-keys:do_deploy"
+do_rootfs[depends] += "signing-keys:do_populate_sysroot"
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index b30a4da..5cd43e9 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -144,16 +144,6 @@ class RpmIndexer(Indexer):
 signer.detach_sign(repomd,
self.d.getVar('PACKAGE_FEED_GPG_NAME', 
True),

self.d.getVar('PACKAGE_FEED_GPG_PASSPHRASE_FILE', True))
-# Copy pubkey(s) to repo
-distro_version = self.d.getVar('DISTRO_VERSION', True) or "oe.0"
-if self.d.getVar('RPM_SIGN_PACKAGES', True) == '1':
-shutil.copy2(self.d.getVar('RPM_GPG_PUBKEY', True),
- os.path.join(self.deploy_dir,
-  'RPM-GPG-KEY-%s' % distro_version))
-if self.d.getVar('PACKAGE_FEED_SIGN', True) == '1':
-shutil.copy2(self.d.getVar('PACKAGE_FEED_GPG_PUBKEY', True),
- os.path.join(self.deploy_dir,
-  'REPODATA-GPG-KEY-%s' % distro_version))
 
 
 class OpkgIndexer(Indexer):
diff --git a/meta/recipes-core/meta/signing-keys.bb 
b/meta/recipes-core/meta/signing-keys.bb
index d7763c6..1d0e834 100644
--- a/meta/recipes-core/meta/signing-keys.bb
+++ b/meta/recipes-core/meta/signing-keys.bb
@@ -3,37 +3,62 @@
 
 DESCRIPTION = "Make public keys of the signing keys available"
 LICENSE = "MIT"
-PACKAGES = ""
-
-do_fetch[noexec] = "1"
-do_unpack[noexec] = "1"
-do_patch[noexec] = "1"
-do_configure[noexec] = "1"
-do_compile[noexec] = "1"
-do_install[noexec] = "1"
-do_package[noexec] = "1"
-do_packagedata[noexec] = "1"
-do_package_write_ipk[noexec] = "1"
-do_package_write_rpm[noexec] = "1"
-do_package_write_deb[noexec] = "1"
-do_populate_sysroot[noexec] = "1"
+LIC_FILES_CHKSUM = 
"file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
+
file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+
+inherit allarch deploy
 
 EXCLUDE_FROM_WORLD = "1"
+INHIBIT_DEFAULT_DEPS = "1"
+
+PACKAGES =+ "${PN}-rpm ${PN}-packagefeed"
 
+FILES_${PN}-rpm = "${sysconfdir}/pki/rpm-gpg"
+FILES_${PN}-packagefeed 

[OE-core] Yocto Project Status WW08

2016-02-19 Thread Jolley, Stephen K
Current Dev Position: YP 2.1 M3

Next Deadline: YP 2.1 M2 Target release date is February 12, 2016 (Will slip a 
few weeks.)


SWAT team rotation: Anibal -> Tracy

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


Key Status/Updates:

*A build for M2-rc3 was passed to QA after successful tests on the 
autobuilder. Unfortunately there appears to be an X11/sato runtime issue, 
seemingly on some 32 bit platforms which may mean another rebuild is needed 
once we identify the regression.

*The pseudo connection retry fixes have highlighted some issues. We 
have debugging patches in master-next which we're trying to use to identify the 
remaining race/client/server connection issues.

*The expansion parameter to getVar and getVarFlag has become mandatory.

*The default make parameters have been changed thanks to some great 
work by Mike Crowe. The original default in hindsight was suboptimal so this is 
something we've wanted to do for a long time.

*M3 is fast closing upon us and is the feature freeze for 2.1. Please 
get all enhancement work and package upgrades in before the end of the month. 
The number of items targeting M3 is a concern as we may have a stampeding herd 
of patches at the deadline.

*We are trying to merge various "invasive" changes before the deadline 
to allow time for those changes to soak test in isolation.

*Recipe upgrade status is continuing at a high of 86%

*A key glibc vulnerability was exposed this week. We have fixes for 
this in master, jethro and fido, all users are strongly recommended to upgrade.


Key YP 2.1 Dates:

YP 2.1 M2 Target release date is February 12, 2016 (Will slip a few weeks.)

YP 2.1 M3 Cutoff (Feature Freeze) date is February 29, 2016 noon GMT

YP 2.1 M3 Target release date is March 18, 2016

YP 2.1 M4 / Final Cutoff: March 28, 2016 noon GMT - Stabilization only 
milestone.

YP 2.1 Final Release Target: April 29, 2016


Key Status Links for YP:

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

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

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


Tracking Metrics:

WDD 2585 (last week 2663)

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


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

Thanks,

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

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


Re: [OE-core] [PATCH v2 1/2] kernel: Add KERNEL_IMAGETYPES to build multi types kernel at one time

2016-02-19 Thread Bruce Ashfield
On Fri, Feb 19, 2016 at 4:56 AM,  wrote:

> From: He Zhe 
>
> Add KERNEL_IMAGETYPES to support building packaging and installing
> multi types of kernel images, such as zImage uImage, at one time.
>
> KERNEL_IMAGETYPE works as before. All KERNEL_ALT_IMAGETYPEs are
> replaced by KERNEL_IMAGETYPES.
>


I see that you have updated layers/configs with the new variable, but
obviously you can't see all the
layers that may be using that old variable.

Isn't it possible to have a python routine that detects the old
ALT_IMAGETYPE variable and
assigns it to the new one (if it isn't already set) ? Sort of like how
distro features/features backfill
work ?


> Fixes [YOCTO #6945].
>
> Signed-off-by: He Zhe 
> ---
>  documentation/ref-manual/ref-variables.xml |  10 +-
>  meta-yocto-bsp/conf/machine/edgerouter.conf|   2 +-
>  meta/classes/kernel-fitimage.bbclass   |  20 +--
>  meta/classes/kernel-grub.bbclass   |  44 --
>  meta/classes/kernel-uimage.bbclass |  22 +--
>  meta/classes/kernel.bbclass| 171
> +++--
>  meta/conf/documentation.conf   |   1 +
>  meta/conf/machine/qemumips.conf|   2 +-
>  meta/conf/machine/qemumips64.conf  |   2 +-
>  meta/recipes-kernel/linux/linux-dtb.inc|  49 +++---
>  .../target/arch/mips/conf/machine/machine.conf |   2 +-
>  .../target/arch/mips64/conf/machine/machine.conf   |   2 +-
>  .../target/arch/qemu/conf/machine/machine.conf |   2 +-
>  13 files changed, 214 insertions(+), 115 deletions(-)
>
> diff --git a/documentation/ref-manual/ref-variables.xml
> b/documentation/ref-manual/ref-variables.xml
> index a76a8c2..a8e4fd8 100644
> --- a/documentation/ref-manual/ref-variables.xml
> +++ b/documentation/ref-manual/ref-variables.xml
> @@ -6417,14 +6417,14 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR
> = "${INC_PR}.3"
>  
>  
>
> - id='var-KERNEL_ALT_IMAGETYPE'>KERNEL_ALT_IMAGETYPE
> + id='var-KERNEL_IMAGETYPES'>KERNEL_IMAGETYPES
>  
> -KERNEL_ALT_IMAGETYPE[doc] = "Specifies an alternate
> kernel image type for creation."
> +KERNEL_IMAGETYPES[doc] = "Specifies alternate kernel
> image types for creation."
>  
>  
>  
>  
> -Specifies an alternate kernel image type for creation
> in
> +Specifies alternate kernel image types for creation in
>  addition to the kernel image type specified using the
>   linkend='var-KERNEL_IMAGETYPE'>KERNEL_IMAGETYPE
>  variable.
> @@ -6612,8 +6612,8 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR =
> "${INC_PR}.3"
>  
>
>  
> -If you want to build an alternate kernel image type,
> use the
> - linkend='var-KERNEL_ALT_IMAGETYPE'>KERNEL_ALT_IMAGETYPE
> +If you want to build alternate kernel image types,
> use the
> + linkend='var-KERNEL_IMAGETYPES'>KERNEL_IMAGETYPES
>  variable.
>  
>  
> diff --git a/meta-yocto-bsp/conf/machine/edgerouter.conf
> b/meta-yocto-bsp/conf/machine/edgerouter.conf
> index 476e690..affd568 100644
> --- a/meta-yocto-bsp/conf/machine/edgerouter.conf
> +++ b/meta-yocto-bsp/conf/machine/edgerouter.conf
> @@ -7,7 +7,7 @@ require conf/machine/include/tune-mips64.inc
>  MACHINE_FEATURES = "pci ext2 ext3 serial"
>
>  KERNEL_IMAGETYPE = "vmlinux"
> -KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
> +KERNEL_IMAGETYPES = "vmlinux.bin"
>

This now reads a bit ... odd (for back of a better description). I'm
concerned that it will cause
confusion, there are two variables:

KERNEL_IMAGETYPE and KERNEL_IMAGETYPES ..

They are very close in name, and just reading the variable doesn't really
tell us why
we'd set one and not the other. The old "ALT" made it more obvious.

But from the patch, KERNEL_IMAGETYPE isn't used, so does it have to be set
at
all in these .conf files ? .. or maybe I missed where it is still used
other than for
compatibility.


>  KERNEL_IMAGE_STRIP_EXTRA_SECTIONS  = ".comment"
>
>  PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
> diff --git a/meta/classes/kernel-fitimage.bbclass
> b/meta/classes/kernel-fitimage.bbclass
> index f1b409c..51df19d 100644
> --- a/meta/classes/kernel-fitimage.bbclass
> +++ b/meta/classes/kernel-fitimage.bbclass
> @@ -1,8 +1,8 @@
>  inherit kernel-uboot
>
>  python __anonymous () {
> -kerneltype = d.getVar('KERNEL_IMAGETYPE', True)
> -if kerneltype == 'fitImage':
> +kerneltypes = d.getVar('KERNEL_IMAGETYPES', True) or ""
> +if 'fitImage' in kerneltypes.split():
>  depends = d.getVar("DEPENDS", True)
>  depends = "%s u-boot-mkimage-native dtc-native" % 

[OE-core] [PATCH v6 0/4] IPK signing for the gpg_sign module

2016-02-19 Thread Ioan-Adrian Ratiu
This patch series extends the gpg_sign module to support ipk signing.

v6 implements Markus' feedback. The most notable change is the sign_ipk
and detach_sign merger, as they were almost identical in functionality.
This also meant a refactoring for detach_sign and a bug fix for the
STDIN file descriptor introduced in gpg > 2.1.

Technically that STDIN bug is a feature (meh) of gpg >2.1 which breaks
existing behaviour so we have to work around it i.e. check the gpg
version and use the loopback interface. This means that gpg-agent to
which gpg >2.1 always connects needs to be running permanently.

Ioan-Adrian Ratiu (4):
  gpg_sign: add local ipk package signing functionality
  gpg_sign: detach_sign: fix gpg > 2.1 STDIN file descriptor
  gpg_sign: export_pubkey: add signature type support
  package_manager: sign IPK package feeds

 meta/classes/package_ipk.bbclass   |  5 +++
 meta/classes/sign_ipk.bbclass  | 52 
 meta/classes/sign_package_feed.bbclass | 12 +-
 meta/lib/oe/gpg_sign.py| 74 +++---
 meta/lib/oe/package_manager.py | 17 +++-
 5 files changed, 143 insertions(+), 17 deletions(-)
 create mode 100644 meta/classes/sign_ipk.bbclass

-- 
2.7.1

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


[OE-core] [PATCH v6 3/4] gpg_sign: export_pubkey: add signature type support

2016-02-19 Thread Ioan-Adrian Ratiu
Add support for multiple types of signatures (binary or ascii)
in export_pubkey(). There is no change in behaviour for the function,
the previous implicit default is the new parameter "armor" default.

Signed-off-by: Ioan-Adrian Ratiu 
---
 meta/lib/oe/gpg_sign.py | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/lib/oe/gpg_sign.py b/meta/lib/oe/gpg_sign.py
index 9f6b0f0..9b3864a 100644
--- a/meta/lib/oe/gpg_sign.py
+++ b/meta/lib/oe/gpg_sign.py
@@ -13,12 +13,14 @@ class LocalSigner(object):
 self.gpg_path = d.getVar('GPG_PATH', True)
 self.rpm_bin = bb.utils.which(os.getenv('PATH'), "rpm")
 
-def export_pubkey(self, output_file, keyid):
+def export_pubkey(self, output_file, keyid, armor=True):
 """Export GPG public key to a file"""
-cmd = '%s --batch --yes --export --armor -o %s ' % \
+cmd = '%s --batch --yes --export -o %s ' % \
 (self.gpg_bin, output_file)
 if self.gpg_path:
 cmd += "--homedir %s " % self.gpg_path
+if armor:
+cmd += "--armor "
 cmd += keyid
 status, output = oe.utils.getstatusoutput(cmd)
 if status:
-- 
2.7.1

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


[OE-core] [PATCH v6 4/4] package_manager: sign IPK package feeds

2016-02-19 Thread Ioan-Adrian Ratiu
Create gpg signed ipk package feeds using the gpg backend if configured.

Signed-off-by: Ioan-Adrian Ratiu 
---
 meta/classes/sign_package_feed.bbclass | 12 +++-
 meta/lib/oe/package_manager.py | 17 +++--
 2 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/meta/classes/sign_package_feed.bbclass 
b/meta/classes/sign_package_feed.bbclass
index 63ca02f..85c37f3 100644
--- a/meta/classes/sign_package_feed.bbclass
+++ b/meta/classes/sign_package_feed.bbclass
@@ -10,6 +10,12 @@
 #   Optional variable for specifying the backend to use for signing.
 #   Currently the only available option is 'local', i.e. local signing
 #   on the build host.
+# PACKAGE_FEED_GPG_SIGNATURE_TYPE
+#   Optional variable for specifying the type of gpg signature, can be:
+#   1. Ascii armored (ASC), default if not set
+#   2. Binary (BIN)
+#   This variable is only available for IPK feeds. It is ignored on
+#   other packaging backends.
 # GPG_BIN
 #   Optional variable for specifying the gpg binary/wrapper to use for
 #   signing.
@@ -20,7 +26,7 @@ inherit sanity
 
 PACKAGE_FEED_SIGN = '1'
 PACKAGE_FEED_GPG_BACKEND ?= 'local'
-
+PACKAGE_FEED_GPG_SIGNATURE_TYPE ?= 'ASC'
 
 python () {
 # Check sanity of configuration
@@ -28,6 +34,10 @@ python () {
 if not d.getVar(var, True):
 raise_sanity_error("You need to define %s in the config" % var, d)
 
+sigtype = d.getVar("PACKAGE_FEED_GPG_SIGNATURE_TYPE", True)
+if sigtype.upper() != "ASC" and sigtype.upper() != "BIN":
+raise_sanity_error("Bad value for PACKAGE_FEED_GPG_SIGNATURE_TYPE 
(%s), use either ASC or BIN" % sigtype)
+
 # Set expected location of the public key
 d.setVar('PACKAGE_FEED_GPG_PUBKEY',
  os.path.join(d.getVar('STAGING_ETCDIR_NATIVE', False),
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index b30a4da..606ba24 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -163,11 +163,16 @@ class OpkgIndexer(Indexer):
  "MULTILIB_ARCHS"]
 
 opkg_index_cmd = bb.utils.which(os.getenv('PATH'), "opkg-make-index")
+if self.d.getVar('PACKAGE_FEED_SIGN', True) == '1':
+signer = get_signer(self.d, 
self.d.getVar('PACKAGE_FEED_GPG_BACKEND', True))
+else:
+signer = None
 
 if not os.path.exists(os.path.join(self.deploy_dir, "Packages")):
 open(os.path.join(self.deploy_dir, "Packages"), "w").close()
 
 index_cmds = []
+index_sign_files = []
 for arch_var in arch_vars:
 archs = self.d.getVar(arch_var, True)
 if archs is None:
@@ -186,6 +191,8 @@ class OpkgIndexer(Indexer):
 index_cmds.append('%s -r %s -p %s -m %s' %
   (opkg_index_cmd, pkgs_file, pkgs_file, 
pkgs_dir))
 
+index_sign_files.append(pkgs_file)
+
 if len(index_cmds) == 0:
 bb.note("There are no packages in %s!" % self.deploy_dir)
 return
@@ -193,9 +200,15 @@ class OpkgIndexer(Indexer):
 result = oe.utils.multiprocess_exec(index_cmds, create_index)
 if result:
 bb.fatal('%s' % ('\n'.join(result)))
-if self.d.getVar('PACKAGE_FEED_SIGN', True) == '1':
-raise NotImplementedError('Package feed signing not implementd for 
ipk')
 
+if signer:
+feed_sig_type = self.d.getVar('PACKAGE_FEED_GPG_SIGNATURE_TYPE', 
True)
+is_ascii_sig = (feed_sig_type.upper() != "BIN")
+for f in index_sign_files:
+signer.detach_sign(f,
+   self.d.getVar('PACKAGE_FEED_GPG_NAME', 
True),
+   
self.d.getVar('PACKAGE_FEED_GPG_PASSPHRASE_FILE', True),
+   armor=is_ascii_sig)
 
 
 class DpkgIndexer(Indexer):
-- 
2.7.1

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


[OE-core] [PATCH v6 1/4] gpg_sign: add local ipk package signing functionality

2016-02-19 Thread Ioan-Adrian Ratiu
Implement ipk signing inside the sign_ipk bbclass using the gpg_sign
module and configure signing similar to how rpm does it. sign_ipk uses
gpg_sign's detach_sign because its functionality is identical to package
feed signing.

IPK signing process is a bit different from rpm:
- Signatures are stored outside ipk files; opkg connects to a feed
server and downloads them to verify a package.
- Signatures are of two types (both supported by opkg): binary or
ascii armoured. By default we sign using ascii armoured.
- Public keys are stored on targets to verify ipks using the
opkg-keyrings recipe.

Signed-off-by: Ioan-Adrian Ratiu 
---
 meta/classes/package_ipk.bbclass |  5 
 meta/classes/sign_ipk.bbclass| 52 
 meta/lib/oe/gpg_sign.py  | 50 --
 3 files changed, 94 insertions(+), 13 deletions(-)
 create mode 100644 meta/classes/sign_ipk.bbclass

diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
index 51bee28..f64837a 100644
--- a/meta/classes/package_ipk.bbclass
+++ b/meta/classes/package_ipk.bbclass
@@ -246,6 +246,11 @@ python do_package_ipk () {
 bb.utils.unlockfile(lf)
 raise bb.build.FuncFailed("opkg-build execution failed")
 
+if d.getVar('IPK_SIGN_PACKAGES', True) == '1':
+ipkver = "%s-%s" % (d.getVar('PKGV'), d.getVar('PKGR'))
+ipk_to_sign = "%s/%s_%s_%s.ipk" % (pkgoutdir, pkgname, ipkver, 
d.getVar('PACKAGE_ARCH', True))
+sign_ipk(d, ipk_to_sign)
+
 cleanupcontrol(root)
 bb.utils.unlockfile(lf)
 
diff --git a/meta/classes/sign_ipk.bbclass b/meta/classes/sign_ipk.bbclass
new file mode 100644
index 000..a481f6d
--- /dev/null
+++ b/meta/classes/sign_ipk.bbclass
@@ -0,0 +1,52 @@
+# Class for generating signed IPK packages.
+#
+# Configuration variables used by this class:
+# IPK_GPG_PASSPHRASE_FILE
+#   Path to a file containing the passphrase of the signing key.
+# IPK_GPG_NAME
+#   Name of the key to sign with.
+# IPK_GPG_BACKEND
+#   Optional variable for specifying the backend to use for signing.
+#   Currently the only available option is 'local', i.e. local signing
+#   on the build host.
+# IPK_GPG_SIGNATURE_TYPE
+#   Optional variable for specifying the type of gpg signatures, can 
be:
+# 1. Ascii armored (ASC), default if not set
+# 2. Binary (BIN)
+# GPG_BIN
+#   Optional variable for specifying the gpg binary/wrapper to use for
+#   signing.
+# GPG_PATH
+#   Optional variable for specifying the gnupg "home" directory:
+#
+
+inherit sanity
+
+IPK_SIGN_PACKAGES = '1'
+IPK_GPG_BACKEND ?= 'local'
+IPK_GPG_SIGNATURE_TYPE ?= 'ASC'
+
+python () {
+# Check configuration
+for var in ('IPK_GPG_NAME', 'IPK_GPG_PASSPHRASE_FILE'):
+if not d.getVar(var, True):
+raise_sanity_error("You need to define %s in the config" % var, d)
+
+sigtype = d.getVar("IPK_GPG_SIGNATURE_TYPE", True)
+if sigtype.upper() != "ASC" and sigtype.upper() != "BIN":
+raise_sanity_error("Bad value for IPK_GPG_SIGNATURE_TYPE (%s), use 
either ASC or BIN" % sigtype)
+}
+
+def sign_ipk(d, ipk_to_sign):
+from oe.gpg_sign import get_signer
+
+bb.debug(1, 'Signing ipk: %s' % ipk_to_sign)
+
+signer = get_signer(d, d.getVar('IPK_GPG_BACKEND', True))
+sig_type = d.getVar('IPK_GPG_SIGNATURE_TYPE', True)
+is_ascii_sig = (sig_type.upper() != "BIN")
+
+signer.detach_sign(ipk_to_sign,
+   d.getVar('IPK_GPG_NAME', True),
+   d.getVar('IPK_GPG_PASSPHRASE_FILE', True),
+   armor=is_ascii_sig)
diff --git a/meta/lib/oe/gpg_sign.py b/meta/lib/oe/gpg_sign.py
index ada1b2f..ef47d1a 100644
--- a/meta/lib/oe/gpg_sign.py
+++ b/meta/lib/oe/gpg_sign.py
@@ -1,5 +1,6 @@
 """Helper module for GPG signing"""
 import os
+import sys
 
 import bb
 import oe.utils
@@ -50,6 +51,7 @@ class LocalSigner(object):
 bb.error('rpmsign failed: %s' % proc.before.strip())
 raise bb.build.FuncFailed("Failed to sign RPM packages")
 
+
 def detach_sign(self, input_file, keyid, passphrase_file, passphrase=None, 
armor=True):
 """Create a detached signature of a file"""
 import subprocess
@@ -57,23 +59,45 @@ class LocalSigner(object):
 if passphrase_file and passphrase:
 raise Exception("You should use either passphrase_file of 
passphrase, not both")
 
-cmd = [self.gpg_bin, '--detach-sign', '--batch', '--no-tty', '--yes',
-   '-u', keyid]
-if passphrase_file:
-cmd += ['--passphrase-file', passphrase_file]
-else:
-cmd += ['--passphrase-fd', '0']
+cmd = [self.gpg_bin, '--detach-sign', '--batch', '--no-tty', '--yes', 
'-u', keyid]
+
 if self.gpg_path:
 cmd += 

[OE-core] [PATCH v6 2/4] gpg_sign: detach_sign: fix gpg > 2.1 STDIN file descriptor

2016-02-19 Thread Ioan-Adrian Ratiu
Starting from v2.1 passing passwords directly to gpg does not work
anymore [1], instead a loopback interface must be used otherwise
gpg >2.1 will error out with:
"gpg: signing failed: Inappropriate ioctl for device"

gpg <2.1 does not work with the new --pinentry-mode arg and gives an
invalid option error, so we detect what is the running version of gpg
and pass it accordingly.

[1] https://wiki.archlinux.org/index.php/GnuPG#Unattended_passphrase

Signed-off-by: Ioan-Adrian Ratiu 
---
 meta/lib/oe/gpg_sign.py | 20 
 1 file changed, 20 insertions(+)

diff --git a/meta/lib/oe/gpg_sign.py b/meta/lib/oe/gpg_sign.py
index ef47d1a..9f6b0f0 100644
--- a/meta/lib/oe/gpg_sign.py
+++ b/meta/lib/oe/gpg_sign.py
@@ -66,6 +66,12 @@ class LocalSigner(object):
 if armor:
 cmd += ['--armor']
 
+#gpg > 2.1 supports password pipes only through the loopback interface
+#gpg < 2.1 errors out if given unknown parameters
+gpg_ver = self.get_gpg_version()
+if gpg_ver > 2.1:
+cmd += ['--pinentry-mode', 'loopback']
+
 try:
 keypipe = os.pipe()
 
@@ -99,6 +105,20 @@ class LocalSigner(object):
 raise Exception("Failed to sign '%s'" % input_file)
 
 
+def get_gpg_version(self):
+"""Return the gpg version"""
+import subprocess
+
+job = subprocess.Popen([self.gpg_bin, "--version"], 
stdout=subprocess.PIPE)
+(stdout, _) = job.communicate()
+
+if job.returncode:
+raise bb.build.FuncFailed("Could not get gpg version (is %s 
installed?)" %
+  self.gpg_bin)
+
+return stdout.split()[2]
+
+
 def verify(self, sig_file):
 """Verify signature"""
 cmd = self.gpg_bin + " --verify "
-- 
2.7.1

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


[OE-core] [Jethro][PATCH 0/5] Jethro Pull request

2016-02-19 Thread Armin Kuster
From: Armin Kuster 

Please consider these security fixes for Jethro next. Some maybe a resend as I 
don't know if they are queued anywhere.

Master has these in some for or another.

The following changes since commit ae57ea03c6a41f2e3b61e0c157e32ca7df7b3c4b:

  libbsd: Security fix CVE-2016-2090 (2016-02-18 10:57:11 +)

are available in the git repository at:

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

Armin Kuster (5):
  uclibc: Security fix CVE-2016-2224
  uclibc: Security fix CVE-2016-2225
  libgcrypt: Security fix CVE-2015-7511
  qemu: Security fix CVE-2016-2197
  qemu: Security fix CVE-2016-2198

 meta/recipes-core/uclibc/uclibc-git.inc|   2 +
 .../uclibc/uclibc-git/CVE-2016-2224.patch  |  49 +
 .../uclibc/uclibc-git/CVE-2016-2225.patch  |  32 +++
 .../recipes-devtools/qemu/qemu/CVE-2016-2197.patch |  59 +
 .../recipes-devtools/qemu/qemu/CVE-2016-2198.patch |  45 
 meta/recipes-devtools/qemu/qemu_2.4.0.bb   |   2 +
 .../libgcrypt/files/CVE-2015-7511_1.patch  | 245 +
 .../libgcrypt/files/CVE-2015-7511_2.patch  |  55 +
 meta/recipes-support/libgcrypt/libgcrypt_1.6.3.bb  |   4 +
 9 files changed, 493 insertions(+)
 create mode 100644 meta/recipes-core/uclibc/uclibc-git/CVE-2016-2224.patch
 create mode 100644 meta/recipes-core/uclibc/uclibc-git/CVE-2016-2225.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2016-2197.patch
 create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2016-2198.patch
 create mode 100644 meta/recipes-support/libgcrypt/files/CVE-2015-7511_1.patch
 create mode 100644 meta/recipes-support/libgcrypt/files/CVE-2015-7511_2.patch

-- 
2.3.5

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


Re: [OE-core] [PATCH v5 1/3] gpg_sign: add local ipk package signing functionality

2016-02-19 Thread Ioan-Adrian Ratiu
On Fri, 19 Feb 2016 13:18:12 +0200
Ioan-Adrian Ratiu  wrote:

> On Thu, 18 Feb 2016 11:28:58 +0200
> Ioan-Adrian Ratiu  wrote:
> 
> > Hello
> > 
> > On Thu, 18 Feb 2016 11:04:22 +0200
> > Markus Lehtonen  wrote:
> >   
> > > Hi,
> > > 
> > > 
> > > 
> > > On 17/02/16 17:41, "Ioan-Adrian Ratiu" 
> > >  > > adrian.ra...@ni.com> wrote:
> > > 
> > > >Implement local ipk signing logic inside the gpg backend and add a new
> > > >bbclass which configures signing similar to how rpm does it.
> > > >
> > > >The ipk signing process is a bit different from rpm:
> > > >- Signatures are stored outside ipk files; opkg connects to a feed
> > > >server and downloads them to verify a package.
> > > >- Signatures are of two types (both supported by opkg): binary or
> > > >ascii armoured. By default we sign using ascii armoured.
> > > >- Public keys are stored on targets to verify ipks using the
> > > >opkg-keyrings recipe.
> > > >
> > > >Signed-off-by: Ioan-Adrian Ratiu 
> > > >---
> > > > meta/classes/package_ipk.bbclass |  6 +
> > > > meta/classes/sign_ipk.bbclass| 55 
> > > > 
> > > > meta/lib/oe/gpg_sign.py  | 39 
> > > > 3 files changed, 100 insertions(+)
> > > > create mode 100644 meta/classes/sign_ipk.bbclass
> > > >
> > > >diff --git a/meta/classes/package_ipk.bbclass 
> > > >b/meta/classes/package_ipk.bbclass
> > > >index 51bee28..4f5bbd0 100644
> > > >--- a/meta/classes/package_ipk.bbclass
> > > >+++ b/meta/classes/package_ipk.bbclass
> > > >@@ -246,6 +246,12 @@ python do_package_ipk () {
> > > > bb.utils.unlockfile(lf)
> > > > raise bb.build.FuncFailed("opkg-build execution failed")
> > > > 
> > > >+if d.getVar('IPK_SIGN_PACKAGES', True) == '1':
> > > >+ipkver = "%s-%s" % (d.getVar('PKGV'), d.getVar('PKGR'))
> > > >+ipk_to_sign = "%s/%s_%s_%s.ipk" % (pkgoutdir, pkgname, 
> > > >ipkver, d.getVar('PACKAGE_ARCH', True))
> > > >+d.setVar('IPK_TO_SIGN', ipk_to_sign)
> > > >+bb.build.exec_func("sign_ipk", d)
> > > >+
> > > > cleanupcontrol(root)
> > > > bb.utils.unlockfile(lf)
> > > > 
> > > >diff --git a/meta/classes/sign_ipk.bbclass 
> > > >b/meta/classes/sign_ipk.bbclass
> > > >new file mode 100644
> > > >index 000..cb22bb4
> > > >--- /dev/null
> > > >+++ b/meta/classes/sign_ipk.bbclass
> > > >@@ -0,0 +1,55 @@
> > > >+# Class for generating signed IPK packages.
> > > >+#
> > > >+# Configuration variables used by this class:
> > > >+# IPK_GPG_PASSPHRASE_FILE
> > > >+#   Path to a file containing the passphrase of the signing key.
> > > >+# IPK_GPG_NAME
> > > >+#   Name of the key to sign with.
> > > >+# IPK_GPG_BACKEND
> > > >+#   Optional variable for specifying the backend to use for 
> > > >signing.
> > > >+#   Currently the only available option is 'local', i.e. local 
> > > >signing
> > > >+#   on the build host.
> > > >+# IPK_GPG_SIGNATURE_TYPE
> > > >+#   Optional variable for specifying the type of gpg 
> > > >signatures, can be:
> > > >+# 1. Ascii armored (ASC), default if not set
> > > >+# 2. Binary (BIN)
> > > >+# GPG_BIN
> > > >+#   Optional variable for specifying the gpg binary/wrapper to 
> > > >use for
> > > >+#   signing.
> > > >+# GPG_PATH
> > > >+#   Optional variable for specifying the gnupg "home" directory:
> > > >+#
> > > >+
> > > >+inherit sanity
> > > >+
> > > >+IPK_SIGN_PACKAGES = '1'
> > > >+IPK_GPG_BACKEND ?= 'local'
> > > >+IPK_GPG_SIGNATURE_TYPE ?= 'ASC'
> > > >+
> > > >+python () {
> > > >+# Check configuration
> > > >+for var in ('IPK_GPG_NAME', 'IPK_GPG_PASSPHRASE_FILE'):
> > > >+if not d.getVar(var, True):
> > > >+raise_sanity_error("You need to define %s in the config" % 
> > > >var, d)
> > > >+
> > > >+sigtype = d.getVar("IPK_GPG_SIGNATURE_TYPE", True)
> > > >+if sigtype.upper() != "ASC" and sigtype.upper() != "BIN":
> > > >+raise_sanity_error("Bad value for IPK_GPG_SIGNATURE_TYPE (%s), 
> > > >use either ASC or BIN" % sigtype)
> > > >+}
> > > >+
> > > >+python sign_ipk () {
> > > >+from oe.gpg_sign import get_signer
> > > >+
> > > >+ipk_file = d.getVar('IPK_TO_SIGN')
> > > >+bb.debug(1, 'Signing ipk: %s' % ipk_file)
> > > >+
> > > >+signer = get_signer(d, d.getVar('IPK_GPG_BACKEND', True))
> > > >+
> > > >+sig_type = d.getVar('IPK_GPG_SIGNATURE_TYPE', True)
> > > >+is_ascii_sig = (sig_type.upper() != "BIN")
> > > >+
> > > >+signer.sign_ipk(ipk_file,
> > > >+d.getVar('IPK_GPG_NAME', True),
> > > >+d.getVar('IPK_GPG_PASSPHRASE_FILE', True),
> > > >+is_ascii_sig)
> > > >+}  
> > > 
> > 

Re: [OE-core] [PATCH v5 1/3] gpg_sign: add local ipk package signing functionality

2016-02-19 Thread Ioan-Adrian Ratiu
On Thu, 18 Feb 2016 11:28:58 +0200
Ioan-Adrian Ratiu  wrote:

> Hello
> 
> On Thu, 18 Feb 2016 11:04:22 +0200
> Markus Lehtonen  wrote:
> 
> > Hi,
> > 
> > 
> > 
> > On 17/02/16 17:41, "Ioan-Adrian Ratiu" 
> >  > adrian.ra...@ni.com> wrote:
> >   
> > >Implement local ipk signing logic inside the gpg backend and add a new
> > >bbclass which configures signing similar to how rpm does it.
> > >
> > >The ipk signing process is a bit different from rpm:
> > >- Signatures are stored outside ipk files; opkg connects to a feed
> > >server and downloads them to verify a package.
> > >- Signatures are of two types (both supported by opkg): binary or
> > >ascii armoured. By default we sign using ascii armoured.
> > >- Public keys are stored on targets to verify ipks using the
> > >opkg-keyrings recipe.
> > >
> > >Signed-off-by: Ioan-Adrian Ratiu 
> > >---
> > > meta/classes/package_ipk.bbclass |  6 +
> > > meta/classes/sign_ipk.bbclass| 55 
> > > 
> > > meta/lib/oe/gpg_sign.py  | 39 
> > > 3 files changed, 100 insertions(+)
> > > create mode 100644 meta/classes/sign_ipk.bbclass
> > >
> > >diff --git a/meta/classes/package_ipk.bbclass 
> > >b/meta/classes/package_ipk.bbclass
> > >index 51bee28..4f5bbd0 100644
> > >--- a/meta/classes/package_ipk.bbclass
> > >+++ b/meta/classes/package_ipk.bbclass
> > >@@ -246,6 +246,12 @@ python do_package_ipk () {
> > > bb.utils.unlockfile(lf)
> > > raise bb.build.FuncFailed("opkg-build execution failed")
> > > 
> > >+if d.getVar('IPK_SIGN_PACKAGES', True) == '1':
> > >+ipkver = "%s-%s" % (d.getVar('PKGV'), d.getVar('PKGR'))
> > >+ipk_to_sign = "%s/%s_%s_%s.ipk" % (pkgoutdir, pkgname, 
> > >ipkver, d.getVar('PACKAGE_ARCH', True))
> > >+d.setVar('IPK_TO_SIGN', ipk_to_sign)
> > >+bb.build.exec_func("sign_ipk", d)
> > >+
> > > cleanupcontrol(root)
> > > bb.utils.unlockfile(lf)
> > > 
> > >diff --git a/meta/classes/sign_ipk.bbclass b/meta/classes/sign_ipk.bbclass
> > >new file mode 100644
> > >index 000..cb22bb4
> > >--- /dev/null
> > >+++ b/meta/classes/sign_ipk.bbclass
> > >@@ -0,0 +1,55 @@
> > >+# Class for generating signed IPK packages.
> > >+#
> > >+# Configuration variables used by this class:
> > >+# IPK_GPG_PASSPHRASE_FILE
> > >+#   Path to a file containing the passphrase of the signing key.
> > >+# IPK_GPG_NAME
> > >+#   Name of the key to sign with.
> > >+# IPK_GPG_BACKEND
> > >+#   Optional variable for specifying the backend to use for 
> > >signing.
> > >+#   Currently the only available option is 'local', i.e. local 
> > >signing
> > >+#   on the build host.
> > >+# IPK_GPG_SIGNATURE_TYPE
> > >+#   Optional variable for specifying the type of gpg signatures, 
> > >can be:
> > >+# 1. Ascii armored (ASC), default if not set
> > >+# 2. Binary (BIN)
> > >+# GPG_BIN
> > >+#   Optional variable for specifying the gpg binary/wrapper to 
> > >use for
> > >+#   signing.
> > >+# GPG_PATH
> > >+#   Optional variable for specifying the gnupg "home" directory:
> > >+#
> > >+
> > >+inherit sanity
> > >+
> > >+IPK_SIGN_PACKAGES = '1'
> > >+IPK_GPG_BACKEND ?= 'local'
> > >+IPK_GPG_SIGNATURE_TYPE ?= 'ASC'
> > >+
> > >+python () {
> > >+# Check configuration
> > >+for var in ('IPK_GPG_NAME', 'IPK_GPG_PASSPHRASE_FILE'):
> > >+if not d.getVar(var, True):
> > >+raise_sanity_error("You need to define %s in the config" % 
> > >var, d)
> > >+
> > >+sigtype = d.getVar("IPK_GPG_SIGNATURE_TYPE", True)
> > >+if sigtype.upper() != "ASC" and sigtype.upper() != "BIN":
> > >+raise_sanity_error("Bad value for IPK_GPG_SIGNATURE_TYPE (%s), 
> > >use either ASC or BIN" % sigtype)
> > >+}
> > >+
> > >+python sign_ipk () {
> > >+from oe.gpg_sign import get_signer
> > >+
> > >+ipk_file = d.getVar('IPK_TO_SIGN')
> > >+bb.debug(1, 'Signing ipk: %s' % ipk_file)
> > >+
> > >+signer = get_signer(d, d.getVar('IPK_GPG_BACKEND', True))
> > >+
> > >+sig_type = d.getVar('IPK_GPG_SIGNATURE_TYPE', True)
> > >+is_ascii_sig = (sig_type.upper() != "BIN")
> > >+
> > >+signer.sign_ipk(ipk_file,
> > >+d.getVar('IPK_GPG_NAME', True),
> > >+d.getVar('IPK_GPG_PASSPHRASE_FILE', True),
> > >+is_ascii_sig)
> > >+}
> > 
> > To me, it would be seem more straightforward to not circulate ipk_to_sign 
> > through 'd'. Just define a regular python function like
> > def sign_ipk(d, ipk_to_sign):
> > ...
> > 
> > And then in package_ipk.bbclass just do "sign_ipk(d, ipk_to_sign)" instead 
> > of bb.build.exec_func("sign_ipk", d)"
> > 
> > 
> > 
> >   
> > >diff 

[OE-core] [PATCH] oeqa/selftest/bbtests: Test bbappend order

2016-02-19 Thread Daniel Istrate
BitBake should append to recipe in a predictable order.

fix for [YOCTO #9145]
test for [YOCTO #9138]

Signed-off-by: Daniel Istrate 
---
 meta/lib/oeqa/selftest/bbtests.py | 23 +++
 1 file changed, 23 insertions(+)

diff --git a/meta/lib/oeqa/selftest/bbtests.py 
b/meta/lib/oeqa/selftest/bbtests.py
index 70e5b29..26728a4 100644
--- a/meta/lib/oeqa/selftest/bbtests.py
+++ b/meta/lib/oeqa/selftest/bbtests.py
@@ -247,3 +247,26 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\"
 for task in tasks:
 self.assertIn('_setscene', task, 'A task different from _setscene 
ran: %s.\n'
  'Executed tasks were: %s' % 
(task, str(tasks)))
+
+@testcase(1425)
+def test_bbappend_order(self):
+""" Bitbake should bbappend to recipe in a predictable order """
+test_recipe = 'ed'
+test_recipe_summary_before = get_bb_var('SUMMARY', test_recipe)
+test_recipe_pv = get_bb_var('PV', test_recipe)
+recipe_append_file = test_recipe + '_' + test_recipe_pv + '.bbappend'
+expected_recipe_summary = test_recipe_summary_before
+
+for i in range(5):
+recipe_append_dir = test_recipe + '_test_' + str(i)
+recipe_append_path = os.path.join(self.testlayer_path, 
'recipes-test', recipe_append_dir, recipe_append_file)
+os.mkdir(os.path.join(self.testlayer_path, 'recipes-test', 
recipe_append_dir))
+feature = 'SUMMARY += "%s"\n' % i
+ftools.write_file(recipe_append_path, feature)
+expected_recipe_summary += ' %s' % i
+
+self.add_command_to_tearDown('rm -rf %s' % 
os.path.join(self.testlayer_path, 'recipes-test',
+   test_recipe + 
'_test_*'))
+
+test_recipe_summary_after = get_bb_var('SUMMARY', test_recipe)
+self.assertEqual(expected_recipe_summary, test_recipe_summary_after)
-- 
2.1.0

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


[OE-core] [PATCH v2 2/2] kernel: Make symbol link to vmlinuz in boot directory

2016-02-19 Thread zhe.he
From: He Zhe 

Rename do_kernel_link_vmlinux to do_kernel_link_images and make a
symbol link to vmlinuz(if exists) for reference in arch/$arch/boot
directory.

Signed-off-by: He Zhe 
---
 documentation/ref-manual/ref-tasks.xml|  8 
 meta/classes/kernel.bbclass   | 13 -
 meta/conf/documentation.conf  |  2 +-
 meta/recipes-kernel/linux/linux-yocto.inc |  2 +-
 4 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/documentation/ref-manual/ref-tasks.xml 
b/documentation/ref-manual/ref-tasks.xml
index 8ac37a0..517663b 100644
--- a/documentation/ref-manual/ref-tasks.xml
+++ b/documentation/ref-manual/ref-tasks.xml
@@ -663,13 +663,13 @@
 
 
 
-
-do_kernel_link_vmlinux
+
+do_kernel_link_images
 
 
 Creates a symbolic link in
-arch/$arch/boot for vmlinux kernel
-images.
+arch/$arch/boot for vmlinux and vmlinuz
+kernel images.
 
 
 
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 6db2e2e..19b5132 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -467,15 +467,18 @@ python split_kernel_packages () {
 }
 
 # Many scripts want to look in arch/$arch/boot for the bootable
-# image. This poses a problem for vmlinux based booting. This 
-# task arranges to have vmlinux appear in the normalized directory
-# location.
-do_kernel_link_vmlinux() {
+# image. This poses a problem for vmlinux and vmlinuz based
+# booting. This task arranges to have vmlinux and vmlinuz appear
+# in the normalized directory location.
+do_kernel_link_images() {
if [ ! -d "${B}/arch/${ARCH}/boot" ]; then
mkdir ${B}/arch/${ARCH}/boot
fi
cd ${B}/arch/${ARCH}/boot
ln -sf ../../../vmlinux
+   if [ -f ../../../vmlinuz ]; then
+   ln -sf ../../../vmlinuz
+   fi
 }
 
 do_strip() {
@@ -505,7 +508,7 @@ do_strip() {
 }
 do_strip[dirs] = "${B}"
 
-addtask do_strip before do_sizecheck after do_kernel_link_vmlinux
+addtask do_strip before do_sizecheck after do_kernel_link_images
 
 # Support checking the kernel size since some kernels need to reside in 
partitions
 # with a fixed length or there is a limit in transferring the kernel to memory
diff --git a/meta/conf/documentation.conf b/meta/conf/documentation.conf
index b3969b0..f0c2399 100644
--- a/meta/conf/documentation.conf
+++ b/meta/conf/documentation.conf
@@ -28,7 +28,7 @@ do_install_ptest_base[doc] = "Copies the runtime test suite 
files from the compi
 do_kernel_checkout[doc] = "Checks out source/meta branches for a linux-yocto 
style kernel"
 do_kernel_configcheck[doc] = "Validates the kernel configuration for a 
linux-yocto style kernel"
 do_kernel_configme[doc] = "Assembles the kernel configuration for a 
linux-yocto style kernel"
-do_kernel_link_vmlinux[doc] = "Creates a symbolic link in arch/$arch/boot for 
vmlinux kernel images"
+do_kernel_link_images[doc] = "Creates a symbolic link in arch/$arch/boot for 
vmlinux and vmlinuz kernel images"
 do_listtasks[doc] = "Lists all defined tasks for a target"
 do_menuconfig[doc] = "Runs 'make menuconfig' for the kernel"
 do_package[doc] = "Analyzes the content of the holding area and splits it into 
subsets based on available packages and files"
diff --git a/meta/recipes-kernel/linux/linux-yocto.inc 
b/meta/recipes-kernel/linux/linux-yocto.inc
index 6b161fc..fd68786 100644
--- a/meta/recipes-kernel/linux/linux-yocto.inc
+++ b/meta/recipes-kernel/linux/linux-yocto.inc
@@ -52,6 +52,6 @@ do_install_append(){
 }
 
 # extra tasks
-addtask kernel_link_vmlinux after do_compile before do_install
+addtask kernel_link_images after do_compile before do_install
 addtask validate_branches before do_patch after do_kernel_checkout
 addtask kernel_configcheck after do_configure before do_compile
-- 
1.9.1

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


[OE-core] [PATCH v2 0/2] Yocto Bug #6945

2016-02-19 Thread zhe.he
From: He Zhe 

v1 to v2:
 - Change KERNEL_OUTPUT to KERNEL_OUTPUT_DIR and update comments
 - Update related doc files
 - Replace all KERNEL_ALT_IMAGETYPEs with KERNEL_IMAGETYPES
 - Link built vmlinuz to boot directory for reference

The following changes since commit ed20c6ca446a8788615e497bd4452195537deab5:

  epiphany: Add libxml2-native to DEPENDS (2016-02-19 01:01:26 +)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib zhe/yocto-bug-6945
  
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=zhe/yocto-bug-6945

for you to fetch changes up to 5ddb8ef58e1cd3c4b95de6439894510641f2e70a:

  kernel: Make symbol link to vmlinuz in boot directory (2016-02-19 04:23:28 
-0500)



He Zhe (2):
  kernel: Add KERNEL_IMAGETYPES to build multi types kernel at one time
  kernel: Make symbol link to vmlinuz in boot directory

 documentation/ref-manual/ref-tasks.xml |   8 +-
 documentation/ref-manual/ref-variables.xml |  10 +-
 meta-yocto-bsp/conf/machine/edgerouter.conf|   2 +-
 meta/classes/kernel-fitimage.bbclass   |  20 ++-
 meta/classes/kernel-grub.bbclass   |  44 +++--
 meta/classes/kernel-uimage.bbclass |  22 +--
 meta/classes/kernel.bbclass| 184 ++---
 meta/conf/documentation.conf   |   3 +-
 meta/conf/machine/qemumips.conf|   2 +-
 meta/conf/machine/qemumips64.conf  |   2 +-
 meta/recipes-kernel/linux/linux-dtb.inc|  49 +++---
 meta/recipes-kernel/linux/linux-yocto.inc  |   2 +-
 .../target/arch/mips/conf/machine/machine.conf |   2 +-
 .../target/arch/mips64/conf/machine/machine.conf   |   2 +-
 .../target/arch/qemu/conf/machine/machine.conf |   2 +-
 15 files changed, 228 insertions(+), 126 deletions(-)

-- 
1.9.1

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


[OE-core] [PATCH v2 1/2] kernel: Add KERNEL_IMAGETYPES to build multi types kernel at one time

2016-02-19 Thread zhe.he
From: He Zhe 

Add KERNEL_IMAGETYPES to support building packaging and installing
multi types of kernel images, such as zImage uImage, at one time.

KERNEL_IMAGETYPE works as before. All KERNEL_ALT_IMAGETYPEs are
replaced by KERNEL_IMAGETYPES.

Fixes [YOCTO #6945].

Signed-off-by: He Zhe 
---
 documentation/ref-manual/ref-variables.xml |  10 +-
 meta-yocto-bsp/conf/machine/edgerouter.conf|   2 +-
 meta/classes/kernel-fitimage.bbclass   |  20 +--
 meta/classes/kernel-grub.bbclass   |  44 --
 meta/classes/kernel-uimage.bbclass |  22 +--
 meta/classes/kernel.bbclass| 171 +++--
 meta/conf/documentation.conf   |   1 +
 meta/conf/machine/qemumips.conf|   2 +-
 meta/conf/machine/qemumips64.conf  |   2 +-
 meta/recipes-kernel/linux/linux-dtb.inc|  49 +++---
 .../target/arch/mips/conf/machine/machine.conf |   2 +-
 .../target/arch/mips64/conf/machine/machine.conf   |   2 +-
 .../target/arch/qemu/conf/machine/machine.conf |   2 +-
 13 files changed, 214 insertions(+), 115 deletions(-)

diff --git a/documentation/ref-manual/ref-variables.xml 
b/documentation/ref-manual/ref-variables.xml
index a76a8c2..a8e4fd8 100644
--- a/documentation/ref-manual/ref-variables.xml
+++ b/documentation/ref-manual/ref-variables.xml
@@ -6417,14 +6417,14 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = 
"${INC_PR}.3"
 
 
 
-KERNEL_ALT_IMAGETYPE
+KERNEL_IMAGETYPES
 
-KERNEL_ALT_IMAGETYPE[doc] = "Specifies an alternate kernel 
image type for creation."
+KERNEL_IMAGETYPES[doc] = "Specifies alternate kernel image 
types for creation."
 
 
 
 
-Specifies an alternate kernel image type for creation in
+Specifies alternate kernel image types for creation in
 addition to the kernel image type specified using the
 KERNEL_IMAGETYPE
 variable.
@@ -6612,8 +6612,8 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = 
"${INC_PR}.3"
 
 
 
-If you want to build an alternate kernel image type, use 
the
-KERNEL_ALT_IMAGETYPE
+If you want to build alternate kernel image types, use the
+KERNEL_IMAGETYPES
 variable.
 
 
diff --git a/meta-yocto-bsp/conf/machine/edgerouter.conf 
b/meta-yocto-bsp/conf/machine/edgerouter.conf
index 476e690..affd568 100644
--- a/meta-yocto-bsp/conf/machine/edgerouter.conf
+++ b/meta-yocto-bsp/conf/machine/edgerouter.conf
@@ -7,7 +7,7 @@ require conf/machine/include/tune-mips64.inc
 MACHINE_FEATURES = "pci ext2 ext3 serial"
 
 KERNEL_IMAGETYPE = "vmlinux"
-KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
+KERNEL_IMAGETYPES = "vmlinux.bin"
 KERNEL_IMAGE_STRIP_EXTRA_SECTIONS  = ".comment"
 
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index f1b409c..51df19d 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -1,8 +1,8 @@
 inherit kernel-uboot
 
 python __anonymous () {
-kerneltype = d.getVar('KERNEL_IMAGETYPE', True)
-if kerneltype == 'fitImage':
+kerneltypes = d.getVar('KERNEL_IMAGETYPES', True) or ""
+if 'fitImage' in kerneltypes.split():
 depends = d.getVar("DEPENDS", True)
 depends = "%s u-boot-mkimage-native dtc-native" % depends
 d.setVar("DEPENDS", depends)
@@ -10,7 +10,9 @@ python __anonymous () {
# Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal
# to kernel.bbclass . We have to override it, since we pack zImage
# (at least for now) into the fitImage .
-d.setVar("KERNEL_IMAGETYPE_FOR_MAKE", "zImage")
+typeformake = d.getVar("KERNEL_IMAGETYPE_FOR_MAKE", True) or ""
+if 'fitImage' in typeformake.split():
+d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', 
typeformake.replace('fitImage', 'zImage'))
 
 image = d.getVar('INITRAMFS_IMAGE', True)
 if image:
@@ -154,7 +156,7 @@ EOF
 }
 
 do_assemble_fitimage() {
-   if test "x${KERNEL_IMAGETYPE}" = "xfitImage" ; then
+   if echo ${KERNEL_IMAGETYPES} | grep -Pq "\bfitImage\b"; then
kernelcount=1
dtbcount=""
rm -f fit-image.its
@@ -217,14 +219,14 @@ addtask assemble_fitimage before do_install after 
do_compile
 
 kernel_do_deploy_append() {
# Update deploy directory
-   if test "x${KERNEL_IMAGETYPE}" = "xfitImage" ; then
+   if echo ${KERNEL_IMAGETYPES} | grep -Pq "\bfitImage\b"; then
cd ${B}
echo "Copying fit-image.its source file..."
-   

Re: [OE-core] [PATCH] signing-keys: Make signing keys the only publisher of keys

2016-02-19 Thread Markus Lehtonen
Hi Randy,

On Thu, 2016-02-18 at 07:38 -0800, Randy Witt wrote:
> Previously the keys were put into the os-release package. The package
> indexing code was also deploying the keys rather than only using the
> keys.
> 
> This change makes signing-keys.bb the only publisher of the keys and
> also
> uses standard tasks that already have sstate.
> 
> Signed-off-by: Randy Witt 
> ---
>  meta/classes/sign_package_feed.bbclass | 11 --
>  meta/classes/sign_rpm.bbclass  | 11 --
>  meta/lib/oe/package_manager.py | 10 -
>  meta/recipes-core/meta/signing-keys.bb | 61
> +-
>  meta/recipes-core/os-release/os-release.bb | 11 --
>  5 files changed, 57 insertions(+), 47 deletions(-)
> 
> diff --git a/meta/classes/sign_package_feed.bbclass
> b/meta/classes/sign_package_feed.bbclass
> index 63ca02f..d6d1603 100644
> --- a/meta/classes/sign_package_feed.bbclass
> +++ b/meta/classes/sign_package_feed.bbclass
> @@ -30,9 +30,12 @@ python () {
>  
>  # Set expected location of the public key
>  d.setVar('PACKAGE_FEED_GPG_PUBKEY',
> - os.path.join(d.getVar('STAGING_ETCDIR_NATIVE', False),
> -   'PACKAGE-FEED-GPG-PUBKEY'))
> + os.path.join(d.getVar('STAGING_DIR_TARGET', False),
> +  d.getVar('sysconfdir', False),
> +  'pki',
> +  'packagefeed-gpg',
> +  'PACKAGEFEED-GPG-KEY-${DISTRO_VERSION}'))
>  }
>  
> -do_package_index[depends] += "signing-keys:do_export_public_keys"
> -do_rootfs[depends] += "signing-keys:do_export_public_keys"
> +do_package_index[depends] += "signing-keys:do_deploy"
> +do_rootfs[depends] += "signing-keys:do_populate_sysroot"
> diff --git a/meta/classes/sign_rpm.bbclass
> b/meta/classes/sign_rpm.bbclass
> index 8bcabee..d3e2b38 100644
> --- a/meta/classes/sign_rpm.bbclass
> +++ b/meta/classes/sign_rpm.bbclass
> @@ -28,8 +28,11 @@ python () {
>  raise_sanity_error("You need to define %s in the config"
> % var, d)
>  
>  # Set the expected location of the public key
> -d.setVar('RPM_GPG_PUBKEY',
> os.path.join(d.getVar('STAGING_ETCDIR_NATIVE', False),
> -'RPM-GPG-PUBKEY'))
> +d.setVar('RPM_GPG_PUBKEY',
> os.path.join(d.getVar('STAGING_DIR_TARGET', False),
> +d.getVar('sysconfdir',
> False),
> +'pki',
> +'rpm-gpg',
> +'RPM-GPG-KEY
> -${DISTRO_VERSION}'))
>  }
>  
>  python sign_rpm () {
> @@ -45,5 +48,5 @@ python sign_rpm () {
>  signer.sign_rpms(rpms)
>  }
>  
> -do_package_index[depends] += "signing-keys:do_export_public_keys"
> -do_rootfs[depends] += "signing-keys:do_export_public_keys"
> +do_package_index[depends] += "signing-keys:do_deploy"
> +do_rootfs[depends] += "signing-keys:do_populate_sysroot"
> diff --git a/meta/lib/oe/package_manager.py
> b/meta/lib/oe/package_manager.py
> index 26f6466..340f104 100644
> --- a/meta/lib/oe/package_manager.py
> +++ b/meta/lib/oe/package_manager.py
> @@ -145,16 +145,6 @@ class RpmIndexer(Indexer):
>  if signer:
>  for repomd in repomd_files:
>  signer.detach_sign(repomd)
> -# Copy pubkey(s) to repo
> -distro_version = self.d.getVar('DISTRO_VERSION', True) or
> "oe.0"
> -if self.d.getVar('RPM_SIGN_PACKAGES', True) == '1':
> -shutil.copy2(self.d.getVar('RPM_GPG_PUBKEY', True),
> - os.path.join(self.deploy_dir,
> -  'RPM-GPG-KEY-%s' %
> distro_version))
> -if self.d.getVar('PACKAGE_FEED_SIGN', True) == '1':
> -shutil.copy2(self.d.getVar('PACKAGE_FEED_GPG_PUBKEY',
> True),
> - os.path.join(self.deploy_dir,
> -  'REPODATA-GPG-KEY-%s' %
> distro_version))
>  
>  
>  class OpkgIndexer(Indexer):
> diff --git a/meta/recipes-core/meta/signing-keys.bb b/meta/recipes
> -core/meta/signing-keys.bb
> index d7aa79d..2f190c3 100644
> --- a/meta/recipes-core/meta/signing-keys.bb
> +++ b/meta/recipes-core/meta/signing-keys.bb
> @@ -3,25 +3,21 @@
>  
>  DESCRIPTION = "Make public keys of the signing keys available"
>  LICENSE = "MIT"
> -PACKAGES = ""
> -
> -do_fetch[noexec] = "1"
> -do_unpack[noexec] = "1"
> -do_patch[noexec] = "1"
> -do_configure[noexec] = "1"
> -do_compile[noexec] = "1"
> -do_install[noexec] = "1"
> -do_package[noexec] = "1"
> -do_packagedata[noexec] = "1"
> -do_package_write_ipk[noexec] = "1"
> -do_package_write_rpm[noexec] = "1"
> -do_package_write_deb[noexec] = "1"
> -do_populate_sysroot[noexec] = "1"
> +LIC_FILES_CHKSUM =
> "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
> +   
>  

[OE-core] [PATCH 1/1] classes/populate_sdk_ext: add a better config extension mechanism

2016-02-19 Thread Paul Eggleton
The sdk_extraconf() method of setting the configuration was awkward
since you needed to set it in a class and then inherit that class since
function definitions aren't allowed in conf files. It seemed to me the
a neater way to do this was to read the extra lines from an additional
conf file sdk-extra.conf (which can be located in a conf/ directory
anywhere along BBPATH as with other configuration files).

Signed-off-by: Paul Eggleton 
---
 meta/classes/populate_sdk_ext.bbclass | 8 
 1 file changed, 8 insertions(+)

diff --git a/meta/classes/populate_sdk_ext.bbclass 
b/meta/classes/populate_sdk_ext.bbclass
index 6e36642..ad12b66 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -175,7 +175,15 @@ python copy_buildsystem () {
 # Hide the config information from bitbake output (since it's fixed 
within the SDK)
 f.write('BUILDCFG_HEADER = ""\n')
 
+# Allow additional config through sdk-extra.conf
+fn = bb.cookerdata.findConfigFile('sdk-extra.conf', d)
+if fn:
+with open(fn, 'r') as xf:
+for line in xf:
+f.write(line)
+
 # If you define a sdk_extraconf() function then it can contain 
additional config
+# (Though this is awkward; sdk-extra.conf should probably be used 
instead)
 extraconf = (d.getVar('sdk_extraconf', True) or '').strip()
 if extraconf:
 # Strip off any leading / trailing spaces
-- 
2.5.0

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


[OE-core] [PATCH 0/1] Improve ext SDK config extension mechanism

2016-02-19 Thread Paul Eggleton
The following changes since commit 58b45240739da210ef2fecea931c8b8daa9a4c07:

  epiphany: Add libxml2-native to DEPENDS (2016-02-18 22:55:12 +)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib paule/extsdkfixes6-oe
  
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/extsdkfixes6-oe

Paul Eggleton (1):
  classes/populate_sdk_ext: add a better config extension mechanism

 meta/classes/populate_sdk_ext.bbclass | 8 
 1 file changed, 8 insertions(+)

-- 
2.5.0

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


[OE-core] [PATCH 14/14] recipetool: create: improve CMake package mapping

2016-02-19 Thread Paul Eggleton
* Package names are actually case sensitive near as I can tell, so we
  shouldn't be lowercasing them everywhere.
* Look for CMake packages in pkgdata and map those back to recipes,
  so we aren't dependent on the hardcoded mappings (though those are
  still preserved).
* Avoid duplicates in the unmapped package list

Signed-off-by: Paul Eggleton 
---
 scripts/lib/recipetool/create.py  | 15 +---
 scripts/lib/recipetool/create_buildsys.py | 39 ++-
 2 files changed, 40 insertions(+), 14 deletions(-)

diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index 3e4bab8..7560cdf 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -43,6 +43,7 @@ def tinfoil_init(instance):
 class RecipeHandler(object):
 recipelibmap = {}
 recipeheadermap = {}
+recipecmakefilemap = {}
 
 @staticmethod
 def load_libmap(d):
@@ -90,15 +91,18 @@ class RecipeHandler(object):
 RecipeHandler.recipelibmap['GLESv2'] = 'virtual/libgles2'
 
 @staticmethod
-def load_headermap(d):
-'''Build up lib headerfile->recipe mapping'''
+def load_devel_filemap(d):
+'''Build up development file->recipe mapping'''
 if RecipeHandler.recipeheadermap:
 return
+pkgdata_dir = d.getVar('PKGDATA_DIR', True)
 includedir = d.getVar('includedir', True)
+cmakedir = os.path.join(d.getVar('libdir', True), 'cmake')
 for pkg in glob.glob(os.path.join(pkgdata_dir, 'runtime', '*-dev')):
 with open(os.path.join(pkgdata_dir, 'runtime', pkg)) as f:
 pn = None
 headers = []
+cmakefiles = []
 for line in f:
 if line.startswith('PN:'):
 pn = line.split(':', 1)[-1].strip()
@@ -108,9 +112,14 @@ class RecipeHandler(object):
 for fullpth in sorted(dictval):
 if fullpth.startswith(includedir) and 
fullpth.endswith('.h'):
 headers.append(os.path.relpath(fullpth, 
includedir))
+elif fullpth.startswith(cmakedir) and 
fullpth.endswith('.cmake'):
+cmakefiles.append(os.path.relpath(fullpth, 
cmakedir))
 if pn and headers:
 for header in headers:
 RecipeHandler.recipeheadermap[header] = pn
+if pn and cmakefiles:
+for fn in cmakefiles:
+RecipeHandler.recipecmakefilemap[fn] = pn
 
 @staticmethod
 def checkfiles(path, speclist, recursive=False):
@@ -172,7 +181,7 @@ class RecipeHandler(object):
 deps.append(recipe)
 elif recipe is None:
 if header:
-RecipeHandler.load_headermap(d)
+RecipeHandler.load_devel_filemap(d)
 recipe = RecipeHandler.recipeheadermap.get(header, None)
 if recipe:
 deps.append(recipe)
diff --git a/scripts/lib/recipetool/create_buildsys.py 
b/scripts/lib/recipetool/create_buildsys.py
index 1a06cac..43dcca3 100644
--- a/scripts/lib/recipetool/create_buildsys.py
+++ b/scripts/lib/recipetool/create_buildsys.py
@@ -17,6 +17,7 @@
 
 import re
 import logging
+import glob
 from recipetool.create import RecipeHandler, validate_pv
 
 logger = logging.getLogger('recipetool')
@@ -156,6 +157,16 @@ class CmakeRecipeHandler(RecipeHandler):
 subdir_re = 
re.compile('add_subdirectory\s*\(\s*([^)\s]*)\s*([^)\s]*)\s*\)', re.IGNORECASE)
 dep_re = re.compile('([^ ><=]+)( *[<>=]+ *[^ ><=]+)?')
 
+def find_cmake_package(pkg):
+RecipeHandler.load_devel_filemap(tinfoil.config_data)
+for fn, pn in RecipeHandler.recipecmakefilemap.iteritems():
+splitname = fn.split('/')
+if len(splitname) > 1:
+if splitname[0].lower().startswith(pkg.lower()):
+if splitname[1] == '%s-config.cmake' % pkg.lower() or 
splitname[1] == '%sConfig.cmake' % pkg or splitname[1] == 'Find%s.cmake' % pkg:
+return pn
+return None
+
 def interpret_value(value):
 return value.strip('"')
 
@@ -209,7 +220,7 @@ class CmakeRecipeHandler(RecipeHandler):
 res = findpackage_re.match(line)
 if res:
 origpkg = res.group(1)
-pkg = interpret_value(origpkg.lower())
+pkg = interpret_value(origpkg)
 found = False
 for handler in handlers:
 if handler.process_findpackage(srctree, fn, pkg, 
deps, outlines, inherits, values):
@@ -218,23 +229,29 @@ class CmakeRecipeHandler(RecipeHandler):
  

[OE-core] [PATCH 09/14] devtool: deploy-target: write deployed files list to target

2016-02-19 Thread Paul Eggleton
When running devtool deploy-target, we save a list of deployed files,
and this list is used by devtool undeploy-target (or the next time
deploy-target is run if the list is present, in case any files have been
renamed or deleted since the first time). We were writing this file to
the host, but it makes more sense to write the list to the target
instead, so that if we for example swap in a different board, or switch
hosts, things will work as expected.

In order to do this properly we have to construct a shell script and
ship it over to the target so we can run it. The manifest is written out
to a hidden directory in the root (/.devtool).

Fixes [YOCTO #7908].

Signed-off-by: Paul Eggleton 
---
 scripts/lib/devtool/deploy.py | 144 ++
 1 file changed, 103 insertions(+), 41 deletions(-)

diff --git a/scripts/lib/devtool/deploy.py b/scripts/lib/devtool/deploy.py
index d742ed3..d2a314b 100644
--- a/scripts/lib/devtool/deploy.py
+++ b/scripts/lib/devtool/deploy.py
@@ -1,6 +1,6 @@
 # Development tool - deploy/undeploy command plugin
 #
-# Copyright (C) 2014-2015 Intel Corporation
+# Copyright (C) 2014-2016 Intel Corporation
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License version 2 as
@@ -19,10 +19,57 @@
 import os
 import subprocess
 import logging
+import tempfile
+import shutil
 from devtool import exec_fakeroot, setup_tinfoil, check_workspace_recipe, 
DevtoolError
 
 logger = logging.getLogger('devtool')
 
+deploylist_path = '/.devtool'
+
+def _prepare_remote_script(deploy, verbose=False):
+"""
+Prepare a shell script for running on the target to
+deploy/undeploy files. We have to be careful what we put in this
+script - only commands that are likely to be available on the
+target are suitable (the target might be constrained, e.g. using
+busybox rather than bash with coreutils).
+"""
+lines = []
+lines.append('#!/bin/sh')
+lines.append('set -e')
+lines.append('manifest="%s/$1.list"' % deploylist_path)
+lines.append('if [ -f $manifest ] ; then')
+# Read manifest in reverse and delete files / remove empty dirs
+lines.append('sed \'1!G;h;$!d\' $manifest | while read file')
+lines.append('do')
+lines.append('if [ -d $file ] ; then')
+lines.append('rmdir $file > /dev/null 2>&1 || true')
+lines.append('else')
+lines.append('rm $file')
+lines.append('fi')
+lines.append('done')
+lines.append('rm $manifest')
+if not deploy:
+# May as well remove all traces
+lines.append('rmdir `dirname $manifest` > /dev/null 2>&1 || true')
+lines.append('fi')
+
+if deploy:
+lines.append('mkdir -p `dirname $manifest`')
+lines.append('mkdir -p $2')
+if verbose:
+lines.append('tar xv -C $2 -f - | tee $manifest')
+else:
+lines.append('tar xv -C $2 -f - > $manifest')
+lines.append('sed -i "s!^./!$2!" $manifest')
+# Delete the script itself
+lines.append('rm $0')
+lines.append('')
+
+return '\n'.join(lines)
+
+
 def deploy(args, config, basepath, workspace):
 """Entry point for the devtool 'deploy' subcommand"""
 import re
@@ -36,9 +83,8 @@ def deploy(args, config, basepath, workspace):
 destdir = '/'
 else:
 args.target = host
-
-deploy_dir = os.path.join(basepath, 'target_deploy', args.target)
-deploy_file = os.path.join(deploy_dir, args.recipename + '.list')
+if not destdir.endswith('/'):
+destdir += '/'
 
 tinfoil = setup_tinfoil(basepath=basepath)
 try:
@@ -59,74 +105,90 @@ def deploy(args, config, basepath, workspace):
 print('  %s' % os.path.join(destdir, os.path.relpath(root, 
recipe_outdir), fn))
 return 0
 
-if os.path.exists(deploy_file):
-if undeploy(args, config, basepath, workspace):
-# Error already shown
-return 1
 
 extraoptions = ''
 if args.no_host_check:
 extraoptions += '-o UserKnownHostsFile=/dev/null -o 
StrictHostKeyChecking=no'
-if args.show_status:
-tarextractopts = 'xv'
-else:
-tarextractopts = 'x'
+if not args.show_status:
 extraoptions += ' -q'
-# We cannot use scp here, because it doesn't preserve symlinks
-ret = exec_fakeroot(rd, 'tar cf - . | ssh %s %s \'tar %s -C %s -f -\'' % 
(extraoptions, args.target, tarextractopts, destdir), cwd=recipe_outdir, 
shell=True)
+
+# In order to delete previously deployed files and have the manifest file 
on
+# the target, we write out a shell script and then copy it to the target
+# so we can then run it (piping tar output to it).
+# (We cannot use scp here, because it doesn't preserve symlinks.)
+tmpdir = tempfile.mkdtemp(prefix='devtool')
+try:
+

[OE-core] [PATCH 12/14] devtool: modify: tweak help description for behaviour change

2016-02-19 Thread Paul Eggleton
I should have adjusted this in OE-Core commit
80a44e52609a89d9ffe816181ae193af491c06ac where the behaviour changed.

Signed-off-by: Paul Eggleton 
---
 scripts/lib/devtool/standard.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 084039a..daf18c9 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -1320,7 +1320,7 @@ def register_commands(subparsers, context):
 parser_add.set_defaults(func=add)
 
 parser_modify = subparsers.add_parser('modify', help='Modify the source 
for an existing recipe',
-   description='Enables modifying the 
source for an existing recipe. You can either provide your own pre-prepared 
source tree, or specify -x/--extract to extract the source being fetched by the 
recipe.',
+   description='Sets up the build 
environment to modify the source for an existing recipe. The default behaviour 
is to extract the source being fetched by the recipe into a git tree so you can 
work on it; alternatively if you already have your own pre-prepared source tree 
you can specify -n/--no-extract.',
group='starting', order=90)
 parser_modify.add_argument('recipename', help='Name of existing recipe to 
edit (just name - no version, path or extension)')
 parser_modify.add_argument('srctree', nargs='?', help='Path to external 
source tree. If not specified, a subdirectory of %s will be used.' % defsrctree)
@@ -1331,7 +1331,7 @@ def register_commands(subparsers, context):
 group = parser_modify.add_mutually_exclusive_group()
 group.add_argument('--same-dir', '-s', help='Build in same directory as 
source', action="store_true")
 group.add_argument('--no-same-dir', help='Force build in a separate build 
directory', action="store_true")
-parser_modify.add_argument('--branch', '-b', default="devtool", help='Name 
for development branch to checkout (only when using -x) (default 
"%(default)s")')
+parser_modify.add_argument('--branch', '-b', default="devtool", help='Name 
for development branch to checkout (when not using -n/--no-extract) (default 
"%(default)s")')
 parser_modify.set_defaults(func=modify)
 
 parser_extract = subparsers.add_parser('extract', help='Extract the source 
for an existing recipe',
-- 
2.5.0

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


[OE-core] [PATCH 10/14] devtool: undeploy-target: support undeploying all recipes

2016-02-19 Thread Paul Eggleton
If you want to put the target device back to exactly how it was before
devtool deploy-target started poking things into it, then it would make
things easier if you didn't have to figure out which recipes were
deployed. Now that we have the list stored on the target we can
determine this reliably, so add a -a/--all option to undeploy-target to
undeploy everything that has been deployed.

One of the side-effects of this is that the dry-run functionality for
undeploy-target had to be reimplemented to actually run the script on
the target, since we have no way of knowing what's been deployed from
the host side. We don't need to do the same for deploy-target though
since we know exactly which files will be deployed without referring to
the target.

Signed-off-by: Paul Eggleton 
---
 scripts/lib/devtool/deploy.py | 59 ---
 1 file changed, 39 insertions(+), 20 deletions(-)

diff --git a/scripts/lib/devtool/deploy.py b/scripts/lib/devtool/deploy.py
index d2a314b..d54f6ba 100644
--- a/scripts/lib/devtool/deploy.py
+++ b/scripts/lib/devtool/deploy.py
@@ -21,13 +21,14 @@ import subprocess
 import logging
 import tempfile
 import shutil
+import argparse_oe
 from devtool import exec_fakeroot, setup_tinfoil, check_workspace_recipe, 
DevtoolError
 
 logger = logging.getLogger('devtool')
 
 deploylist_path = '/.devtool'
 
-def _prepare_remote_script(deploy, verbose=False):
+def _prepare_remote_script(deploy, verbose=False, dryrun=False, 
undeployall=False):
 """
 Prepare a shell script for running on the target to
 deploy/undeploy files. We have to be careful what we put in this
@@ -38,19 +39,33 @@ def _prepare_remote_script(deploy, verbose=False):
 lines = []
 lines.append('#!/bin/sh')
 lines.append('set -e')
+if undeployall:
+# Yes, I know this is crude - but it does work
+lines.append('for entry in %s/*.list; do' % deploylist_path)
+lines.append('[ ! -f $entry ] && exit')
+lines.append('set `basename $entry | sed "s/.list//"`')
+if dryrun:
+if not deploy:
+lines.append('echo "Previously deployed files for $1:"')
 lines.append('manifest="%s/$1.list"' % deploylist_path)
 lines.append('if [ -f $manifest ] ; then')
 # Read manifest in reverse and delete files / remove empty dirs
 lines.append('sed \'1!G;h;$!d\' $manifest | while read file')
 lines.append('do')
-lines.append('if [ -d $file ] ; then')
-lines.append('rmdir $file > /dev/null 2>&1 || true')
-lines.append('else')
-lines.append('rm $file')
-lines.append('fi')
+if dryrun:
+lines.append('if [ ! -d $file ] ; then')
+lines.append('echo $file')
+lines.append('fi')
+else:
+lines.append('if [ -d $file ] ; then')
+lines.append('rmdir $file > /dev/null 2>&1 || true')
+lines.append('else')
+lines.append('rm $file')
+lines.append('fi')
 lines.append('done')
-lines.append('rm $manifest')
-if not deploy:
+if not dryrun:
+lines.append('rm $manifest')
+if not deploy and not dryrun:
 # May as well remove all traces
 lines.append('rmdir `dirname $manifest` > /dev/null 2>&1 || true')
 lines.append('fi')
@@ -63,6 +78,12 @@ def _prepare_remote_script(deploy, verbose=False):
 else:
 lines.append('tar xv -C $2 -f - > $manifest')
 lines.append('sed -i "s!^./!$2!" $manifest')
+
+if undeployall:
+if not dryrun:
+lines.append('echo "NOTE: Successfully undeployed $1"')
+lines.append('done')
+
 # Delete the script itself
 lines.append('rm $0')
 lines.append('')
@@ -149,6 +170,11 @@ def deploy(args, config, basepath, workspace):
 
 def undeploy(args, config, basepath, workspace):
 """Entry point for the devtool 'undeploy' subcommand"""
+if args.all and args.recipename:
+raise argparse_oe.ArgumentUsageError('Cannot specify -a/--all with a 
recipe name', 'undeploy-target')
+elif not args.recipename and not args.all:
+raise argparse_oe.ArgumentUsageError('If you don\'t specify a recipe, 
you must specify -a/--all', 'undeploy-target')
+
 extraoptions = ''
 if args.no_host_check:
 extraoptions += '-o UserKnownHostsFile=/dev/null -o 
StrictHostKeyChecking=no'
@@ -157,19 +183,10 @@ def undeploy(args, config, basepath, workspace):
 
 args.target = args.target.split(':')[0]
 
-if args.dry_run:
-listfile = os.path.join(deploylist_path, '%s.list' % args.recipename)
-print('Previously deployed files to be un-deployed for %s on target 
%s:' % (args.recipename, args.target))
-ret = subprocess.call('ssh %s %s \'[ -f %s ] && cat %s || true\'' % 
(extraoptions, args.target, listfile, listfile), 

[OE-core] [PATCH 03/14] devtool: reset: fix preserving patches/other files next to recipes

2016-02-19 Thread Paul Eggleton
If files had been created next to the recipe (for example devtool add,
edit the source and commit and then devtool update-recipe), running
devtool reset failed to preserve those files and gave an error due
to trying to rmdir the directory containing them which wasn't empty.
Fix the preservation of files in the "attic" directory properly so
we catch anything under the directory for the recipe, and replicate
the same structure in the attic directory rather than slightly
flattening it as we were before.

Signed-off-by: Paul Eggleton 
---
 scripts/lib/devtool/standard.py | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 590dfef..bbbe426 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -190,7 +190,7 @@ def add(args, config, basepath, workspace):
 shutil.move(recipes[0], recipefile)
 else:
 raise DevtoolError('Command \'%s\' did not create any recipe 
file:\n%s' % (e.command, e.stdout))
-attic_recipe = os.path.join(config.workspace_path, 'attic', 
os.path.basename(recipefile))
+attic_recipe = os.path.join(config.workspace_path, 'attic', 
recipename, os.path.basename(recipefile))
 if os.path.exists(attic_recipe):
 logger.warn('A modified recipe from a previous invocation exists 
in %s - you may wish to move this over the top of the new recipe if you had 
changes in it that you want to continue with' % attic_recipe)
 finally:
@@ -645,7 +645,7 @@ def _check_preserve(config, recipename):
 import bb.utils
 origfile = os.path.join(config.workspace_path, '.devtool_md5')
 newfile = os.path.join(config.workspace_path, '.devtool_md5_new')
-preservepath = os.path.join(config.workspace_path, 'attic')
+preservepath = os.path.join(config.workspace_path, 'attic', recipename)
 with open(origfile, 'r') as f:
 with open(newfile, 'w') as tf:
 for line in f.readlines():
@@ -1256,7 +1256,7 @@ def reset(args, config, basepath, workspace):
 for pn in recipes:
 _check_preserve(config, pn)
 
-preservepath = os.path.join(config.workspace_path, 'attic', pn)
+preservepath = os.path.join(config.workspace_path, 'attic', pn, pn)
 def preservedir(origdir):
 if os.path.exists(origdir):
 for root, dirs, files in os.walk(origdir):
@@ -1265,7 +1265,7 @@ def reset(args, config, basepath, workspace):
 _move_file(os.path.join(origdir, fn),
os.path.join(preservepath, fn))
 for dn in dirs:
-os.rmdir(os.path.join(root, dn))
+preservedir(os.path.join(root, dn))
 os.rmdir(origdir)
 
 preservedir(os.path.join(config.workspace_path, 'recipes', pn))
-- 
2.5.0

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


[OE-core] [PATCH 08/14] devtool: sdk-update: tweak command-line handling of updateserver

2016-02-19 Thread Paul Eggleton
Get the default value for updateserver from the configuration file and
show it in the help; also only make the parameter optional if it's
specified. This means we can also drop the check in the function as
argparse will then ensure it's specified if there's no config setting.

Signed-off-by: Paul Eggleton 
---
 scripts/lib/devtool/sdk.py | 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/scripts/lib/devtool/sdk.py b/scripts/lib/devtool/sdk.py
index f6c5434..fbf2e79 100644
--- a/scripts/lib/devtool/sdk.py
+++ b/scripts/lib/devtool/sdk.py
@@ -95,8 +95,6 @@ def sdk_update(args, config, basepath, workspace):
 updateserver = args.updateserver
 if not updateserver:
 updateserver = config.get('SDK', 'updateserver', '')
-if not updateserver:
-raise DevtoolError("Update server not specified in config file, you 
must specify it on the command line")
 logger.debug("updateserver: %s" % updateserver)
 
 # Make sure we are using sdk-update from within SDK
@@ -297,9 +295,14 @@ def register_commands(subparsers, context):
 """Register devtool subcommands from the sdk plugin"""
 if context.fixed_setup:
 parser_sdk = subparsers.add_parser('sdk-update',
-   help='Update SDK components from a 
nominated location',
+   help='Update SDK components',
+   description='Updates installed SDK 
components from a remote server',
group='sdk')
-parser_sdk.add_argument('updateserver', help='The update server to 
fetch latest SDK components from', nargs='?')
+updateserver = context.config.get('SDK', 'updateserver', '')
+if updateserver:
+parser_sdk.add_argument('updateserver', help='The update server to 
fetch latest SDK components from (default %s)' % updateserver, nargs='?')
+else:
+parser_sdk.add_argument('updateserver', help='The update server to 
fetch latest SDK components from')
 parser_sdk.add_argument('--skip-prepare', action="store_true", 
help='Skip re-preparing the build system after updating (for debugging only)')
 parser_sdk.set_defaults(func=sdk_update)
 
-- 
2.5.0

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


[OE-core] [PATCH 13/14] recipetool: create: add additional extension mechanisms

2016-02-19 Thread Paul Eggleton
Add a means of extending the dependency extraction for autotools and
cmake.

Note: in order to have this work, you need to have an __init__.py in the
lib/recipetool directory within your layer along with the module
implementing the handlers, and the __init__.py needs to contain:

  # Enable other layers to have modules in the same named directory
  from pkgutil import extend_path
  __path__ = extend_path(__path__, __name__)

Signed-off-by: Paul Eggleton 
---
 scripts/lib/recipetool/create_buildsys.py| 119 +--
 scripts/lib/recipetool/create_buildsys_python.py |   2 +-
 2 files changed, 113 insertions(+), 8 deletions(-)

diff --git a/scripts/lib/recipetool/create_buildsys.py 
b/scripts/lib/recipetool/create_buildsys.py
index 4d11e04..1a06cac 100644
--- a/scripts/lib/recipetool/create_buildsys.py
+++ b/scripts/lib/recipetool/create_buildsys.py
@@ -22,6 +22,12 @@ from recipetool.create import RecipeHandler, validate_pv
 logger = logging.getLogger('recipetool')
 
 tinfoil = None
+plugins = None
+
+def plugin_init(pluginlist):
+# Take a reference to the list so we can use it later
+global plugins
+plugins = pluginlist
 
 def tinfoil_init(instance):
 global tinfoil
@@ -48,6 +54,13 @@ class CmakeRecipeHandler(RecipeHandler):
 
 @staticmethod
 def extract_cmake_deps(outlines, srctree, extravalues, 
cmakelistsfile=None):
+# Find all plugins that want to register handlers
+logger.debug('Loading cmake handlers')
+handlers = []
+for plugin in plugins:
+if hasattr(plugin, 'register_cmake_handlers'):
+plugin.register_cmake_handlers(handlers)
+
 values = {}
 inherits = []
 
@@ -152,6 +165,9 @@ class CmakeRecipeHandler(RecipeHandler):
 with open(fn, 'r') as f:
 for line in f:
 line = line.strip()
+for handler in handlers:
+if handler.process_line(srctree, fn, line, libdeps, 
pcdeps, deps, outlines, inherits, values):
+continue
 res = include_re.match(line)
 if res:
 includefn = bb.utils.which(':'.join(searchpaths), 
res.group(1))
@@ -194,7 +210,15 @@ class CmakeRecipeHandler(RecipeHandler):
 if res:
 origpkg = res.group(1)
 pkg = interpret_value(origpkg.lower())
-if pkg == 'gettext':
+found = False
+for handler in handlers:
+if handler.process_findpackage(srctree, fn, pkg, 
deps, outlines, inherits, values):
+logger.debug('Mapped CMake package %s via 
handler %s' % (pkg, handler.__class__.__name__))
+found = True
+break
+if found:
+continue
+elif pkg == 'gettext':
 inherits.append('gettext')
 elif pkg == 'perl':
 inherits.append('perlnative')
@@ -207,6 +231,7 @@ class CmakeRecipeHandler(RecipeHandler):
 else:
 dep = cmake_pkgmap.get(pkg, None)
 if dep:
+logger.debug('Mapped CMake package %s to 
recipe %s via internal list' % (pkg, dep))
 deps.append(dep)
 elif dep is None:
 unmappedpkgs.append(origpkg)
@@ -236,11 +261,39 @@ class CmakeRecipeHandler(RecipeHandler):
 
 RecipeHandler.handle_depends(libdeps, pcdeps, deps, outlines, values, 
tinfoil.config_data)
 
+for handler in handlers:
+handler.post_process(srctree, libdeps, pcdeps, deps, outlines, 
inherits, values)
+
 if inherits:
 values['inherit'] = ' '.join(list(set(inherits)))
 
 return values
 
+
+class CmakeExtensionHandler(object):
+'''Base class for CMake extension handlers'''
+def process_line(self, srctree, fn, line, libdeps, pcdeps, deps, outlines, 
inherits, values):
+'''
+Handle a line parsed out of an CMake file.
+Return True if you've completely handled the passed in line, otherwise 
return False.
+'''
+return False
+
+def process_findpackage(self, srctree, fn, pkg, deps, outlines, inherits, 
values):
+'''
+Handle a find_package package parsed out of a CMake file.
+Return True if you've completely handled the passed in package, 
otherwise return False.
+'''
+return False
+
+def post_process(self, srctree, fn, pkg, deps, outlines, inherits, values):
+'''
+Apply any desired post-processing on the output
+'''
+return
+
+
+
 class 

[OE-core] [PATCH 01/14] devtool: minor fix for error message

2016-02-19 Thread Paul Eggleton
There is no -N/--name option for devtool, that's a recipetool option -
with devtool you just specify the name as a positional argument.

Signed-off-by: Paul Eggleton 
---
 scripts/lib/devtool/standard.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index d12cc2e..590dfef 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -150,7 +150,7 @@ def add(args, config, basepath, workspace):
 stdout, _ = exec_build_env_command(config.init_path, basepath, 
'recipetool --color=%s create -o %s "%s" %s' % (color, tempdir, source, 
extracmdopts))
 except bb.process.ExecutionError as e:
 if e.exitcode == 15:
-raise DevtoolError('Unable to auto-determine name from source 
tree, please specify it with -N/--name')
+raise DevtoolError('Unable to auto-determine recipe name from 
source tree, please specify it on the command line')
 else:
 raise DevtoolError('Command \'%s\' failed:\n%s' % (e.command, 
e.stdout))
 
-- 
2.5.0

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


[OE-core] [PATCH 11/14] devtool: deploy-target: preserve existing files

2016-02-19 Thread Paul Eggleton
If files would be overwritten by the deployment, preserve them in a
separate location on the target so that they can be restored if you
later run devtool undeploy-target.

At the same time, also check for sufficient space before starting the
operation so that we avoid potentially failing part way through.

Fixes [YOCTO #8978].

Signed-off-by: Paul Eggleton 
---
 scripts/lib/devtool/deploy.py | 87 ++-
 1 file changed, 78 insertions(+), 9 deletions(-)

diff --git a/scripts/lib/devtool/deploy.py b/scripts/lib/devtool/deploy.py
index d54f6ba..66644cc 100644
--- a/scripts/lib/devtool/deploy.py
+++ b/scripts/lib/devtool/deploy.py
@@ -28,7 +28,7 @@ logger = logging.getLogger('devtool')
 
 deploylist_path = '/.devtool'
 
-def _prepare_remote_script(deploy, verbose=False, dryrun=False, 
undeployall=False):
+def _prepare_remote_script(deploy, verbose=False, dryrun=False, 
undeployall=False, nopreserve=False, nocheckspace=False):
 """
 Prepare a shell script for running on the target to
 deploy/undeploy files. We have to be careful what we put in this
@@ -48,6 +48,7 @@ def _prepare_remote_script(deploy, verbose=False, 
dryrun=False, undeployall=Fals
 if not deploy:
 lines.append('echo "Previously deployed files for $1:"')
 lines.append('manifest="%s/$1.list"' % deploylist_path)
+lines.append('preservedir="%s/$1.preserve"' % deploylist_path)
 lines.append('if [ -f $manifest ] ; then')
 # Read manifest in reverse and delete files / remove empty dirs
 lines.append('sed \'1!G;h;$!d\' $manifest | while read file')
@@ -58,7 +59,10 @@ def _prepare_remote_script(deploy, verbose=False, 
dryrun=False, undeployall=Fals
 lines.append('fi')
 else:
 lines.append('if [ -d $file ] ; then')
-lines.append('rmdir $file > /dev/null 2>&1 || true')
+# Avoid deleting a preserved directory in case it has special perms
+lines.append('if [ ! -d $preservedir/$file ] ; then')
+lines.append('rmdir $file > /dev/null 2>&1 || true')
+lines.append('fi')
 lines.append('else')
 lines.append('rm $file')
 lines.append('fi')
@@ -71,6 +75,39 @@ def _prepare_remote_script(deploy, verbose=False, 
dryrun=False, undeployall=Fals
 lines.append('fi')
 
 if deploy:
+if not nocheckspace:
+# Check for available space
+# FIXME This doesn't take into account files spread across multiple
+# partitions, but doing that is non-trivial
+# Find the part of the destination path that exists
+lines.append('checkpath="$2"')
+lines.append('while [ "$checkpath" != "/" ] && [ ! -e $checkpath 
]')
+lines.append('do')
+lines.append('checkpath=`dirname "$checkpath"`')
+lines.append('done')
+lines.append('freespace=`df -P $checkpath | sed "1d" | awk \'{ 
print $4 }\'`')
+# First line of the file is the total space
+lines.append('total=`head -n1 $3`')
+lines.append('if [ $total -gt $freespace ] ; then')
+lines.append('echo "ERROR: insufficient space on target 
(available ${freespace}, needed ${total})"')
+lines.append('exit 1')
+lines.append('fi')
+if not nopreserve:
+# Preserve any files that exist. Note that this will add to the
+# preserved list with successive deployments if the list of files
+# deployed changes, but because we've deleted any previously
+# deployed files at this point it will never preserve anything
+# that was deployed, only files that existed prior to any deploying
+# (which makes the most sense)
+lines.append('cat $3 | sed "1d" | while read file fsize')
+lines.append('do')
+lines.append('if [ -e $file ] ; then')
+lines.append('dest="$preservedir/$file"')
+lines.append('mkdir -p `dirname $dest`')
+lines.append('mv $file $dest')
+lines.append('fi')
+lines.append('done')
+lines.append('rm $3')
 lines.append('mkdir -p `dirname $manifest`')
 lines.append('mkdir -p $2')
 if verbose:
@@ -78,6 +115,14 @@ def _prepare_remote_script(deploy, verbose=False, 
dryrun=False, undeployall=Fals
 else:
 lines.append('tar xv -C $2 -f - > $manifest')
 lines.append('sed -i "s!^./!$2!" $manifest')
+elif not dryrun:
+# Put any preserved files back
+lines.append('if [ -d $preservedir ] ; then')
+lines.append('cd $preservedir')
+lines.append('find . -type f -exec mv {} /{} \;')
+lines.append('cd /')
+lines.append('rm -rf $preservedir')
+  

[OE-core] [PATCH 02/14] devtool / recipetool: use common code for launching editor

2016-02-19 Thread Paul Eggleton
Looking at Chris Larson's code for starting the user's editor for
"recipetool newappend" it was slightly better than what I wrote for
"devtool edit-recipe" in that it checks VISUAL as well as EDITOR and
defaults to vi if neither are set, so break this out to its own function
and call it from both places. The broken out version passes shell=True
however in case it's a more complicated command rather than just a name
of an executable.

Signed-off-by: Paul Eggleton 
---
 scripts/lib/devtool/utilcmds.py | 13 ++---
 scripts/lib/recipetool/newappend.py |  8 ++--
 scripts/lib/scriptutils.py  | 15 +++
 3 files changed, 19 insertions(+), 17 deletions(-)

diff --git a/scripts/lib/devtool/utilcmds.py b/scripts/lib/devtool/utilcmds.py
index a8f5e97..18eddb7 100644
--- a/scripts/lib/devtool/utilcmds.py
+++ b/scripts/lib/devtool/utilcmds.py
@@ -24,6 +24,7 @@ import tempfile
 import logging
 import argparse
 import subprocess
+import scriptutils
 from devtool import exec_build_env_command, setup_tinfoil, 
check_workspace_recipe, DevtoolError
 from devtool import parse_recipe
 
@@ -48,17 +49,7 @@ def edit_recipe(args, config, basepath, workspace):
 raise DevtoolError("Recipe file for %s is not under the workspace" 
%
args.recipename)
 
-editor = os.environ.get('EDITOR', None)
-if not editor:
-raise DevtoolError("EDITOR environment variable not set")
-
-import subprocess
-try:
-subprocess.check_call('%s "%s"' % (editor, recipefile), shell=True)
-except subprocess.CalledProcessError as e:
-return e.returncode
-
-return 0
+return scriptutils.run_editor(recipefile)
 
 
 def configure_help(args, config, basepath, workspace):
diff --git a/scripts/lib/recipetool/newappend.py 
b/scripts/lib/recipetool/newappend.py
index 5625a8e..bdf0693 100644
--- a/scripts/lib/recipetool/newappend.py
+++ b/scripts/lib/recipetool/newappend.py
@@ -27,6 +27,7 @@ import os
 import re
 import subprocess
 import sys
+import scriptutils
 
 
 logger = logging.getLogger('recipetool')
@@ -96,12 +97,7 @@ def newappend(args):
 return 1
 
 if args.edit:
-editor = os.getenv('VISUAL', os.getenv('EDITOR', 'vi'))
-try:
-return subprocess.check_call([editor, append_path, recipe_path])
-except OSError as exc:
-logger.error("Execution of editor '%s' failed: %s", editor, exc)
-return 1
+return scriptutils.run_editor([append_path, recipe_path])
 else:
 print(append_path)
 
diff --git a/scripts/lib/scriptutils.py b/scripts/lib/scriptutils.py
index 69e76d8..aef19d3 100644
--- a/scripts/lib/scriptutils.py
+++ b/scripts/lib/scriptutils.py
@@ -20,6 +20,7 @@ import os
 import logging
 import glob
 import argparse
+import subprocess
 
 def logger_create(name):
 logger = logging.getLogger(name)
@@ -101,3 +102,17 @@ def fetch_uri(d, uri, destdir, srcrev=None):
 os.chdir(olddir)
 return ret
 
+def run_editor(fn):
+if isinstance(fn, basestring):
+params = '"%s"' % fn
+else:
+params = ''
+for fnitem in fn:
+params += ' "%s"' % fnitem
+
+editor = os.getenv('VISUAL', os.getenv('EDITOR', 'vi'))
+try:
+return subprocess.check_call('%s %s' % (editor, params), shell=True)
+except OSError as exc:
+logger.error("Execution of editor '%s' failed: %s", editor, exc)
+return 1
-- 
2.5.0

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


[OE-core] [PATCH 07/14] devtool: (un)deploy-target: add help descriptions

2016-02-19 Thread Paul Eggleton
Add a long description used when running --help on the specific command.

Signed-off-by: Paul Eggleton 
---
 scripts/lib/devtool/deploy.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/lib/devtool/deploy.py b/scripts/lib/devtool/deploy.py
index 0236c53..d742ed3 100644
--- a/scripts/lib/devtool/deploy.py
+++ b/scripts/lib/devtool/deploy.py
@@ -133,6 +133,7 @@ def register_commands(subparsers, context):
 """Register devtool subcommands from the deploy plugin"""
 parser_deploy = subparsers.add_parser('deploy-target',
   help='Deploy recipe output files to 
live target machine',
+  description='Deploys a recipe\'s 
build output (i.e. the output of the do_install task) to a live target machine 
over ssh. Note: this only deploys the recipe itself and not any runtime 
dependencies, so it is assumed that those have been installed on the target 
beforehand.',
   group='testbuild')
 parser_deploy.add_argument('recipename', help='Recipe to deploy')
 parser_deploy.add_argument('target', help='Live target machine running an 
ssh server: user@hostname[:destdir]')
@@ -143,6 +144,7 @@ def register_commands(subparsers, context):
 
 parser_undeploy = subparsers.add_parser('undeploy-target',
 help='Undeploy recipe output files 
in live target machine',
+description='Un-deploys recipe 
output files previously deployed to a live target machine by devtool 
deploy-target.',
 group='testbuild')
 parser_undeploy.add_argument('recipename', help='Recipe to undeploy')
 parser_undeploy.add_argument('target', help='Live target machine running 
an ssh server: user@hostname')
-- 
2.5.0

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


[OE-core] [PATCH 04/14] devtool: update-recipe: don't show workspace recipe warning if no update

2016-02-19 Thread Paul Eggleton
If we didn't make any changes to the file then there's no point warning
the user that we have done.

Signed-off-by: Paul Eggleton 
---
 scripts/lib/devtool/standard.py | 14 +-
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index bbbe426..804c127 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -1034,6 +1034,7 @@ def _update_recipe_srcrev(args, srctree, rd, config_data):
 'changes')
 
 _remove_source_files(args, remove_files, destpath)
+return True
 
 def _update_recipe_patch(args, config, workspace, srctree, rd, config_data):
 """Implement the 'patch' mode of update-recipe"""
@@ -1135,10 +1136,12 @@ def _update_recipe_patch(args, config, workspace, 
srctree, rd, config_data):
 elif not updatefiles:
 # Neither patches nor recipe were updated
 logger.info('No patches or files need updating')
+return False
 finally:
 shutil.rmtree(tempdir)
 
 _remove_source_files(args, remove_files, destpath)
+return True
 
 def _guess_recipe_update_mode(srctree, rdata):
 """Guess the recipe update mode to use"""
@@ -1187,15 +1190,16 @@ def update_recipe(args, config, basepath, workspace):
 mode = args.mode
 
 if mode == 'srcrev':
-_update_recipe_srcrev(args, srctree, rd, tinfoil.config_data)
+updated = _update_recipe_srcrev(args, srctree, rd, tinfoil.config_data)
 elif mode == 'patch':
-_update_recipe_patch(args, config, workspace, srctree, rd, 
tinfoil.config_data)
+updated = _update_recipe_patch(args, config, workspace, srctree, rd, 
tinfoil.config_data)
 else:
 raise DevtoolError('update_recipe: invalid mode %s' % mode)
 
-rf = rd.getVar('FILE', True)
-if rf.startswith(config.workspace_path):
-logger.warn('Recipe file %s has been updated but is inside the 
workspace - you will need to move it (and any associated files next to it) out 
to the desired layer before using "devtool reset" in order to keep any changes' 
% rf)
+if updated:
+rf = rd.getVar('FILE', True)
+if rf.startswith(config.workspace_path):
+logger.warn('Recipe file %s has been updated but is inside the 
workspace - you will need to move it (and any associated files next to it) out 
to the desired layer before using "devtool reset" in order to keep any changes' 
% rf)
 
 return 0
 
-- 
2.5.0

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


[OE-core] [PATCH 00/14] devtool / recipetool improvements

2016-02-19 Thread Paul Eggleton
More devtool / recipetool work - some improvements to the help output,
behaviour of (un)deploy-target, extensibility of autoconf/cmake
handling, and improvements to cmake dependency extraction, plus one
or two other minor fixes.


The following changes since commit 58b45240739da210ef2fecea931c8b8daa9a4c07:

  epiphany: Add libxml2-native to DEPENDS (2016-02-18 22:55:12 +)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib paule/devtool14-oe
  
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/devtool14-oe

Paul Eggleton (14):
  devtool: minor fix for error message
  devtool / recipetool: use common code for launching editor
  devtool: reset: fix preserving patches/other files next to recipes
  devtool: update-recipe: don't show workspace recipe warning if no update
  devtool: categorise and order subcommands in help output
  scripts/lib/argparse_oe: tweak title above options
  devtool: (un)deploy-target: add help descriptions
  devtool: sdk-update: tweak command-line handling of updateserver
  devtool: deploy-target: write deployed files list to target
  devtool: undeploy-target: support undeploying all recipes
  devtool: deploy-target: preserve existing files
  devtool: modify: tweak help description for behaviour change
  recipetool: create: add additional extension mechanisms
  recipetool: create: improve CMake package mapping

 scripts/devtool  |  10 +-
 scripts/lib/argparse_oe.py   |  63 ++
 scripts/lib/devtool/build-image.py   |   3 +-
 scripts/lib/devtool/build.py |   3 +-
 scripts/lib/devtool/deploy.py| 248 ++-
 scripts/lib/devtool/package.py   |   5 +-
 scripts/lib/devtool/runqemu.py   |   3 +-
 scripts/lib/devtool/sdk.py   |  19 +-
 scripts/lib/devtool/search.py|   3 +-
 scripts/lib/devtool/standard.py  |  47 +++--
 scripts/lib/devtool/upgrade.py   |   3 +-
 scripts/lib/devtool/utilcmds.py  |  19 +-
 scripts/lib/recipetool/create.py |  15 +-
 scripts/lib/recipetool/create_buildsys.py| 154 --
 scripts/lib/recipetool/create_buildsys_python.py |   2 +-
 scripts/lib/recipetool/newappend.py  |   8 +-
 scripts/lib/scriptutils.py   |  15 ++
 17 files changed, 505 insertions(+), 115 deletions(-)

-- 
2.5.0

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


[OE-core] [PATCH 05/14] devtool: categorise and order subcommands in help output

2016-02-19 Thread Paul Eggleton
The listing of subcommands in the --help output for devtool was starting
to get difficult to follow, with commands appearing in no particular
order (due to some being in separate modules and the order of those
modules being parsed). Logically grouping the subcommands as well as
being able to exercise some control over the order of the subcommands
and groups would help, if we do so without losing the dynamic nature of
the list (i.e. that it comes from the plugins). Argparse provides no
built-in way to handle this and really, really makes it a pain to add,
but with some subclassing and hacking it's now possible, and can be
extended by any plugin as desired.

To put a subcommand into a group, all you need to do is specify a group=
parameter in the call to subparsers.add_parser(). you can also specify
an order= parameter to make the subcommand sort higher or lower in the
list (higher order numbers appear first, so use negative numbers to
force items to the end if that's what you want). To add a new group, use
subparsers.add_subparser_group(), supplying the name, description and
optionally an order number for the group itself (again, higher numbers
appear first).

Signed-off-by: Paul Eggleton 
---
 scripts/devtool| 10 ++-
 scripts/lib/argparse_oe.py | 59 ++
 scripts/lib/devtool/build-image.py |  3 +-
 scripts/lib/devtool/build.py   |  3 +-
 scripts/lib/devtool/deploy.py  |  8 --
 scripts/lib/devtool/package.py |  5 +++-
 scripts/lib/devtool/runqemu.py |  3 +-
 scripts/lib/devtool/sdk.py | 10 +--
 scripts/lib/devtool/search.py  |  3 +-
 scripts/lib/devtool/standard.py| 21 +-
 scripts/lib/devtool/upgrade.py |  3 +-
 scripts/lib/devtool/utilcmds.py|  6 ++--
 12 files changed, 114 insertions(+), 20 deletions(-)

diff --git a/scripts/devtool b/scripts/devtool
index 2d57da0b..ed8f3a1 100755
--- a/scripts/devtool
+++ b/scripts/devtool
@@ -271,10 +271,18 @@ def main():
 
 subparsers = parser.add_subparsers(dest="subparser_name", 
title='subcommands', metavar='')
 
+subparsers.add_subparser_group('sdk', 'SDK maintenance', -2)
+subparsers.add_subparser_group('advanced', 'Advanced', -1)
+subparsers.add_subparser_group('starting', 'Beginning work on a recipe', 
100)
+subparsers.add_subparser_group('info', 'Getting information')
+subparsers.add_subparser_group('working', 'Working on a recipe in the 
workspace')
+subparsers.add_subparser_group('testbuild', 'Testing changes on target')
+
 if not context.fixed_setup:
 parser_create_workspace = subparsers.add_parser('create-workspace',
 help='Set up workspace 
in an alternative location',
-description='Sets up a 
new workspace. NOTE: other devtool subcommands will create a workspace 
automatically as needed, so you only need to use %(prog)s if you want to 
specify where the workspace should be located.')
+description='Sets up a 
new workspace. NOTE: other devtool subcommands will create a workspace 
automatically as needed, so you only need to use %(prog)s if you want to 
specify where the workspace should be located.',
+group='advanced')
 parser_create_workspace.add_argument('layerpath', nargs='?', 
help='Path in which the workspace layer should be created')
 parser_create_workspace.add_argument('--create-only', 
action="store_true", help='Only create the workspace layer, do not alter 
configuration')
 parser_create_workspace.set_defaults(func=create_workspace, 
no_workspace=True)
diff --git a/scripts/lib/argparse_oe.py b/scripts/lib/argparse_oe.py
index fd86692..744cfe3 100644
--- a/scripts/lib/argparse_oe.py
+++ b/scripts/lib/argparse_oe.py
@@ -1,5 +1,6 @@
 import sys
 import argparse
+from collections import defaultdict, OrderedDict
 
 class ArgumentUsageError(Exception):
 """Exception class you can raise (and catch) in order to show the help"""
@@ -9,6 +10,10 @@ class ArgumentUsageError(Exception):
 
 class ArgumentParser(argparse.ArgumentParser):
 """Our own version of argparse's ArgumentParser"""
+def __init__(self, *args, **kwargs):
+kwargs.setdefault('formatter_class', OeHelpFormatter)
+self._subparser_groups = OrderedDict()
+super(ArgumentParser, self).__init__(*args, **kwargs)
 
 def error(self, message):
 sys.stderr.write('ERROR: %s\n' % message)
@@ -27,10 +32,26 @@ class ArgumentParser(argparse.ArgumentParser):
 
 def add_subparsers(self, *args, **kwargs):
 ret = super(ArgumentParser, self).add_subparsers(*args, **kwargs)
+# Need a way of accessing the parent parser
+ret._parent_parser = self
+# Ensure our class gets instantiated
 

[OE-core] [PATCH 06/14] scripts/lib/argparse_oe: tweak title above options

2016-02-19 Thread Paul Eggleton
Naming these as "optional arguments" is perhaps slightly confusing since
some of the positional arguments might also be optional; in addition
it's rare (though possible) for options to be mandatory - up until
recently we had a recipetool option (-o) that was mandatory. It's not
perfect, but change it to "options" so it's at least a bit more
appropriate.

Signed-off-by: Paul Eggleton 
---
 scripts/lib/argparse_oe.py | 4 
 1 file changed, 4 insertions(+)

diff --git a/scripts/lib/argparse_oe.py b/scripts/lib/argparse_oe.py
index 744cfe3..bf3ebad 100644
--- a/scripts/lib/argparse_oe.py
+++ b/scripts/lib/argparse_oe.py
@@ -51,6 +51,10 @@ class ArgumentSubParser(ArgumentParser):
 if 'order' in kwargs:
 self._order = kwargs.pop('order')
 super(ArgumentSubParser, self).__init__(*args, **kwargs)
+for agroup in self._action_groups:
+if agroup.title == 'optional arguments':
+agroup.title = 'options'
+break
 
 def parse_known_args(self, args=None, namespace=None):
 # This works around argparse not handling optional positional 
arguments being
-- 
2.5.0

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


Re: [OE-core] [PATCH v2 2/2] devtool: update-recipe: create config fragment

2016-02-19 Thread Markus Lehtonen
On Thu, 2016-02-18 at 15:19 +, Christopher Larson wrote:
> 
> 
> On Thu, Feb 18, 2016 at 7:19 AM Markus Lehtonen <
> markus.lehto...@linux.intel.com> wrote:
> > Create config fragment if the user makes modifications to kernel
> > config.
> > User may change .config e.g. by directly editing it or by running
> > the
> > 'do_menuconfig' bitbake task. Devtool generates one monolithic
> > fragment
> > by simply doing a diff between .config and .config.baseline files
> > in the
> > source directory.  If either of these files is missing, the config
> > fragment is not gerenrated or updated. The output is a file,
> > 'devtool-fragment.cfg' that gets added to SRC_URI in the recipe (as
> > well
> > as copied into the 'oe-local-files' directory if that is present in
> > the
> > source tree).
> > 
> > ${S}/.config will be a symlink to ${B}/.config. We need to do this
> > as
> > devtool is not able to access ${B} because ${B} is set in a
> > .bbappend in
> > the workspace layer which is not parsed by devtool itself.
> > 
> > [YOCTO #8999]
> > 
> > Signed-off-by: Markus Lehtonen 
> If the devtool-fragment.cfg already exists, what's the behavior? Will
> it update it with both the old and new changes, or will it create a
> second fragment?
Currently, it will update the existing fragment.
   - Markus
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 4/4] staging.bbclass: remove trail slash from SYSROOT_DESTDIR

2016-02-19 Thread Robert Yang
Fixed path:
QA Issue:  sysroot-destdir//usr/lib/ 

Note the 2 slashes "//".

Signed-off-by: Robert Yang 
---
 meta/classes/staging.bbclass |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass
index 243bcdf..bc5dfa8 100644
--- a/meta/classes/staging.bbclass
+++ b/meta/classes/staging.bbclass
@@ -161,7 +161,7 @@ do_populate_sysroot[umask] = "022"
 addtask populate_sysroot after do_install
 
 SYSROOT_PREPROCESS_FUNCS ?= ""
-SYSROOT_DESTDIR = "${WORKDIR}/sysroot-destdir/"
+SYSROOT_DESTDIR = "${WORKDIR}/sysroot-destdir"
 SYSROOT_LOCK = "${STAGING_DIR}/staging.lock"
 
 # We clean out any existing sstate from the sysroot if we rerun configure
-- 
1.7.9.5

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


[OE-core] [PATCH 0/4] meta: 4 fixes

2016-02-19 Thread Robert Yang
The following changes since commit 58b45240739da210ef2fecea931c8b8daa9a4c07:

  epiphany: Add libxml2-native to DEPENDS (2016-02-18 22:55:12 +)

are available in the git repository at:

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

Robert Yang (4):
  image.bbclass: fix circular dependency when IMAGE_FSTYPES append
hddimg
  recipe_sanity.bbclass: skip DataSmart in recipe_sanity_eh()
  terminal.bbclass: import oe.terminal for oe.terminal.prioritized()
  staging.bbclass: remove trail slash from SYSROOT_DESTDIR

 meta/classes/image-live.bbclass|   11 ++-
 meta/classes/recipe_sanity.bbclass |5 ++---
 meta/classes/staging.bbclass   |2 +-
 meta/classes/terminal.bbclass  |6 --
 4 files changed, 17 insertions(+), 7 deletions(-)

-- 
1.7.9.5

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


[OE-core] [PATCH 2/4] recipe_sanity.bbclass: skip DataSmart in recipe_sanity_eh()

2016-02-19 Thread Robert Yang
Fixed:
$ bitbake quilt -crecipe_sanity
  File "/path/to/poky/bitbake/lib/bb/siggen.py", line 261, in dump_sigtask
p = pickle.dump(data, stream, -1)
PicklingError: Can't pickle :
attribute lookup bb.COW.C failed

This is because of:
cfgdata[k] = d.getVar(k, 0)

If d.getVar(k, 0) is a DataSmart (for example, BB_ORIGENV), it won't
have the attribute of bb.COW.C, so the error happend.

Signed-off-by: Robert Yang 
---
 meta/classes/recipe_sanity.bbclass |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/meta/classes/recipe_sanity.bbclass 
b/meta/classes/recipe_sanity.bbclass
index ee04e33..295611f 100644
--- a/meta/classes/recipe_sanity.bbclass
+++ b/meta/classes/recipe_sanity.bbclass
@@ -143,9 +143,8 @@ python recipe_sanity_eh () {
 
 cfgdata = {}
 for k in d.keys():
-#for k in ["S", "PR", "PV", "PN", "DESCRIPTION", "LICENSE", "DEPENDS",
-#  "SECTION"]:
-cfgdata[k] = d.getVar(k, 0)
+if not isinstance(d.getVar(k, 0), bb.data_smart.DataSmart):
+cfgdata[k] = d.getVar(k, 0)
 
 d.setVar("__recipe_sanity_cfgdata", cfgdata)
 #d.setVar("__recipe_sanity_cfgdata", d)
-- 
1.7.9.5

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


[OE-core] [PATCH 1/4] image.bbclass: fix circular dependency when IMAGE_FSTYPES append hddimg

2016-02-19 Thread Robert Yang
Fixed:
IMAGE_FSTYPES_append = " hddimg"

$ bitbake -g core-image-minimal-initramfs
NOTE: Resolving any missing task queue dependencies
NOTE: Preparing RunQueue
ERROR: Task /path/to/core-image-minimal-initramfs.bb (do_bootimg) has circular 
dependency on /path/to/core-image-minimal-initramfs.bb (do_image_complete)
ERROR: Command execution failed: Exited with 1

This is because IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}", and if
IMAGE_FSTYPES append hddimg, then core-image-minimal-initramfs.bb would
be circular dependency:
do_bootimg -> do_image_complete -> do_bootimg.

Now we check and error out.

Signed-off-by: Robert Yang 
---
 meta/classes/image-live.bbclass |   11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/meta/classes/image-live.bbclass b/meta/classes/image-live.bbclass
index aafa7d5..d2314aa 100644
--- a/meta/classes/image-live.bbclass
+++ b/meta/classes/image-live.bbclass
@@ -9,7 +9,6 @@ LABELS_append = " ${SYSLINUX_LABELS} "
 
 ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.ext4"
 
-do_bootimg[depends] += "${INITRD_IMAGE}:do_image_complete"
 do_bootimg[depends] += "${PN}:do_image_ext4"
 
 inherit bootimg
@@ -18,3 +17,13 @@ IMAGE_TYPEDEP_live = "ext4"
 IMAGE_TYPEDEP_iso = "ext4"
 IMAGE_TYPEDEP_hddimg = "ext4"
 IMAGE_TYPES_MASKED += "live hddimg iso"
+
+python() {
+image_b = d.getVar('IMAGE_BASENAME', True)
+initrd_i = d.getVar('INITRD_IMAGE', True)
+if image_b == initrd_i:
+bb.error('INITRD_IMAGE %s cannot use image live, hddimg or iso.' % 
initrd_i)
+bb.fatal('Check IMAGE_FSTYPES and INITRAMFS_FSTYPES settings.')
+else:
+d.appendVarFlag('do_bootimg', 'depends', ' %s:do_image_complete' % 
initrd_i)
+}
-- 
1.7.9.5

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


[OE-core] [PATCH 3/4] terminal.bbclass: import oe.terminal for oe.terminal.prioritized()

2016-02-19 Thread Robert Yang
Fixed:
INHERIT += "typecheck"
$ bitbake -p
ERROR: Failure expanding expression auto none ${@" ".join(o.name for o in 
oe.terminal.prioritized())}
which triggered exception AttributeError: 'module' object has no attribute 
'terminal'

Signed-off-by: Robert Yang 
---
 meta/classes/terminal.bbclass |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/classes/terminal.bbclass b/meta/classes/terminal.bbclass
index fd87cfe..9f4c24e 100644
--- a/meta/classes/terminal.bbclass
+++ b/meta/classes/terminal.bbclass
@@ -1,8 +1,7 @@
 OE_TERMINAL ?= 'auto'
 OE_TERMINAL[type] = 'choice'
 OE_TERMINAL[choices] = 'auto none \
-${@" ".join(o.name \
-for o in oe.terminal.prioritized())}'
+${@oe_terminal_prioritized()}'
 
 OE_TERMINAL_EXPORTS += 'EXTRA_OEMAKE'
 OE_TERMINAL_EXPORTS[type] = 'list'
@@ -10,6 +9,9 @@ OE_TERMINAL_EXPORTS[type] = 'list'
 XAUTHORITY ?= "${HOME}/.Xauthority"
 SHELL ?= "bash"
 
+def oe_terminal_prioritized():
+import oe.terminal
+return " ".join(o.name for o in oe.terminal.prioritized())
 
 def emit_terminal_func(command, envdata, d):
 cmd_func = 'do_terminal'
-- 
1.7.9.5

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


Re: [OE-core] Recovering GCC 4.8

2016-02-19 Thread Gary Thomas

On 2016-02-19 09:02, Phil Blundell wrote:

On Fri, 2016-02-19 at 07:37 +0100, Gary Thomas wrote:

| checking for suffix of object files... configure: error: in
`/local/p0381_2016-02-19/tmp/work/cortexa7hf-neon-amltd-linux-gnueabi/libgcc-initial/4.8.4-r0/gcc-4.8.4/build.arm-amltd-linux-gnueabi.arm-amltd-linux-gnueabi/libgcc':
| configure: error: cannot compute suffix of object files: cannot compile
| See `config.log' for more details.


I suspect you probably have some or other option set in CC or CFLAGS
that gcc-4.8 doesn't support.  What does it say in config.log?


It's complaining about an illegal -march=armv7ve, which seems to have
been added since I last built for this machine with GCC 4.8:

commit c6a19917ec5350cdfc4053d14462609782613bbc
Author: Martin Jansa 
Date:   Tue Oct 6 17:08:59 2015 +0200

arch-armv7ve: add tune include for armv7ve and use it from cortexa7 and 
cortexa15

I'll see what I can do with this.  Duh, I should have looked at
the config.log before raising flags!

--

Gary Thomas |  Consulting for the
MLB Associates  |Embedded world

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


Re: [OE-core] Recovering GCC 4.8

2016-02-19 Thread Phil Blundell
On Fri, 2016-02-19 at 07:37 +0100, Gary Thomas wrote:
> | checking for suffix of object files... configure: error: in 
> `/local/p0381_2016-02-19/tmp/work/cortexa7hf-neon-amltd-linux-gnueabi/libgcc-initial/4.8.4-r0/gcc-4.8.4/build.arm-amltd-linux-gnueabi.arm-amltd-linux-gnueabi/libgcc':
> | configure: error: cannot compute suffix of object files: cannot compile
> | See `config.log' for more details.

I suspect you probably have some or other option set in CC or CFLAGS
that gcc-4.8 doesn't support.  What does it say in config.log?

p.


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


[OE-core] [PATCH] toolchain-scripts.bbclass: add three other path to PATH in env.sh

2016-02-19 Thread Jun Zhang
in sdk,there are some utils in sysroot/host-os/bin, 
sysroot/host-os/sbin/,sysroot/host-os/usr/bin need to use, so add these three 
paths to PATH in env.sh.

Signed-off-by: Jun Zhang 
---
 meta/classes/toolchain-scripts.bbclass | 5 -
 meta/conf/bitbake.conf | 3 +++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/meta/classes/toolchain-scripts.bbclass 
b/meta/classes/toolchain-scripts.bbclass
index 835422f..33fb4e3 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -9,6 +9,9 @@ TARGET_CC_ARCH_append_libc-musl = " -mmusl"
 # This function creates an environment-setup-script for use in a deployable SDK
 toolchain_create_sdk_env_script () {
# Create environment setup script
+   base_sbindir=${10:-${base_sbindir_nativesdk}}
+   base_bindir=${9:-${base_bindir_nativesdk}}
+   sbindir=${8:-${sbindir_nativesdk}}
sdkpathnative=${7:-${SDKPATHNATIVE}}
prefix=${6:-${prefix_nativesdk}}
bindir=${5:-${bindir_nativesdk}}
@@ -23,7 +26,7 @@ toolchain_create_sdk_env_script () {
for i in ${CANADIANEXTRAOS}; do

EXTRAPATH="$EXTRAPATH:$sdkpathnative$bindir/${TARGET_ARCH}${TARGET_VENDOR}-$i"
done
-   echo "export 
PATH=$sdkpathnative$bindir:$sdkpathnative$bindir/../${HOST_SYS}/bin:$sdkpathnative$bindir/${TARGET_SYS}"$EXTRAPATH':$PATH'
 >> $script
+   echo "export 
PATH=$sdkpathnative$bindir:$sdkpathnative$sbindir:$sdkpathnative$base_bindir:$sdkpathnative$base_sbindir:$sdkpathnative$bindir/../${HOST_SYS}/bin:$sdkpathnative$bindir/${TARGET_SYS}"$EXTRAPATH':$PATH'
 >> $script
echo "export 
CCACHE_PATH=$sdkpathnative$bindir:$sdkpathnative$bindir/../${HOST_SYS}/bin:$sdkpathnative$bindir/${TARGET_SYS}"$EXTRAPATH':$CCACHE_PATH'
 >> $script
echo 'export PKG_CONFIG_SYSROOT_DIR=$SDKTARGETSYSROOT' >> $script
echo 'export PKG_CONFIG_PATH=$SDKTARGETSYSROOT'"$libdir"'/pkgconfig' >> 
$script
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 2b81be1..6b18ae8 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -62,6 +62,9 @@ bindir_cross = "/bin"
 bindir_crossscripts = "${bindir}/crossscripts"
 prefix_nativesdk = "/usr"
 bindir_nativesdk = "${prefix_nativesdk}/bin"
+sbindir_nativesdk = "${prefix_nativesdk}/sbin"
+base_bindir_nativesdk = "/bin"
+base_sbindir_nativesdk = "/sbin"
 includedir_nativesdk = "${prefix_nativesdk}/include"
 libdir_nativesdk = "${prefix_nativesdk}/lib"
 base_libdir_nativesdk = "/lib"
-- 
1.9.1

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