* [PATCH] ncurses: 6.0+20160625 -> 6.0+20161126
From: Huang Qiyu @ 2016-12-22 4:54 UTC (permalink / raw)
To: openembedded-core
Upgrade ncurses from 6.0+20160625 to 6.0+20161126.
Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>
---
.../ncurses/{ncurses_6.0+20160625.bb => ncurses_6.0+20161126.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-core/ncurses/{ncurses_6.0+20160625.bb => ncurses_6.0+20161126.bb} (84%)
diff --git a/meta/recipes-core/ncurses/ncurses_6.0+20160625.bb b/meta/recipes-core/ncurses/ncurses_6.0+20161126.bb
similarity index 84%
rename from meta/recipes-core/ncurses/ncurses_6.0+20160625.bb
rename to meta/recipes-core/ncurses/ncurses_6.0+20161126.bb
index 6514613..7328e78 100644
--- a/meta/recipes-core/ncurses/ncurses_6.0+20160625.bb
+++ b/meta/recipes-core/ncurses/ncurses_6.0+20161126.bb
@@ -4,7 +4,7 @@ SRC_URI += "file://tic-hang.patch \
file://config.cache \
"
# commit id corresponds to the revision in package version
-SRCREV = "63dd558cb8e888d6fab5f00bbf7842736a2356b9"
+SRCREV = "3db0bd19cb50e3d9b4f2cf15b7a102fe11302068"
S = "${WORKDIR}/git"
EXTRA_OECONF += "--with-abi-version=5"
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+(\+\d+)*)"
--
2.7.4
^ permalink raw reply related
* [PATCH] gstreamer1.0-plugins-bad: Backport patches for improving live playback
From: Khem Raj @ 2016-12-22 8:14 UTC (permalink / raw)
To: openembedded-core
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
...1-mssdemux-improved-live-playback-support.patch | 929 +++++++++++++++++++++
...ming-implement-adaptivedemux-s-get_live_s.patch | 183 ++++
...ming-use-the-duration-from-the-list-of-fr.patch | 62 ++
.../gstreamer/gstreamer1.0-plugins-bad_1.10.2.bb | 3 +
4 files changed, 1177 insertions(+)
create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-mssdemux-improved-live-playback-support.patch
create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-smoothstreaming-implement-adaptivedemux-s-get_live_s.patch
create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-smoothstreaming-use-the-duration-from-the-list-of-fr.patch
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-mssdemux-improved-live-playback-support.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-mssdemux-improved-live-playback-support.patch
new file mode 100644
index 0000000000..4832c18e78
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-mssdemux-improved-live-playback-support.patch
@@ -0,0 +1,929 @@
+From 73721ad4e9e2d32e1c8b6a3b4aaa98401530e58a Mon Sep 17 00:00:00 2001
+From: Philippe Normand <philn@igalia.com>
+Date: Tue, 29 Nov 2016 14:43:41 +0100
+Subject: [PATCH] mssdemux: improved live playback support
+
+When a MSS server hosts a live stream the fragments listed in the
+manifest usually don't have accurate timestamps and duration, except
+for the first fragment, which additionally stores timing information
+for the few upcoming fragments. In this scenario it is useless to
+periodically fetch and update the manifest and the fragments list can
+be incrementally built by parsing the first/current fragment.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=755036
+---
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+ ext/smoothstreaming/Makefile.am | 2 +
+ ext/smoothstreaming/gstmssdemux.c | 60 ++++++
+ ext/smoothstreaming/gstmssfragmentparser.c | 266 ++++++++++++++++++++++++++
+ ext/smoothstreaming/gstmssfragmentparser.h | 84 ++++++++
+ ext/smoothstreaming/gstmssmanifest.c | 158 ++++++++++++++-
+ ext/smoothstreaming/gstmssmanifest.h | 7 +
+ gst-libs/gst/adaptivedemux/gstadaptivedemux.c | 27 ++-
+ gst-libs/gst/adaptivedemux/gstadaptivedemux.h | 14 ++
+ 8 files changed, 606 insertions(+), 12 deletions(-)
+ create mode 100644 ext/smoothstreaming/gstmssfragmentparser.c
+ create mode 100644 ext/smoothstreaming/gstmssfragmentparser.h
+
+diff --git a/ext/smoothstreaming/Makefile.am b/ext/smoothstreaming/Makefile.am
+index 4faf9df9f..a5e1ad6ae 100644
+--- a/ext/smoothstreaming/Makefile.am
++++ b/ext/smoothstreaming/Makefile.am
+@@ -13,8 +13,10 @@ libgstsmoothstreaming_la_LIBADD = \
+ libgstsmoothstreaming_la_LDFLAGS = ${GST_PLUGIN_LDFLAGS}
+ libgstsmoothstreaming_la_SOURCES = gstsmoothstreaming-plugin.c \
+ gstmssdemux.c \
++ gstmssfragmentparser.c \
+ gstmssmanifest.c
+ libgstsmoothstreaming_la_LIBTOOLFLAGS = --tag=disable-static
+
+ noinst_HEADERS = gstmssdemux.h \
++ gstmssfragmentparser.h \
+ gstmssmanifest.h
+diff --git a/ext/smoothstreaming/gstmssdemux.c b/ext/smoothstreaming/gstmssdemux.c
+index 12fb40497..120d9c22b 100644
+--- a/ext/smoothstreaming/gstmssdemux.c
++++ b/ext/smoothstreaming/gstmssdemux.c
+@@ -135,11 +135,18 @@ gst_mss_demux_stream_update_fragment_info (GstAdaptiveDemuxStream * stream);
+ static gboolean gst_mss_demux_seek (GstAdaptiveDemux * demux, GstEvent * seek);
+ static gint64
+ gst_mss_demux_get_manifest_update_interval (GstAdaptiveDemux * demux);
++static gint64
++gst_mss_demux_stream_get_fragment_waiting_time (GstAdaptiveDemuxStream *
++ stream);
+ static GstFlowReturn
+ gst_mss_demux_update_manifest_data (GstAdaptiveDemux * demux,
+ GstBuffer * buffer);
+ static gboolean gst_mss_demux_get_live_seek_range (GstAdaptiveDemux * demux,
+ gint64 * start, gint64 * stop);
++static GstFlowReturn gst_mss_demux_data_received (GstAdaptiveDemux * demux,
++ GstAdaptiveDemuxStream * stream, GstBuffer * buffer);
++static gboolean
++gst_mss_demux_requires_periodical_playlist_update (GstAdaptiveDemux * demux);
+
+ static void
+ gst_mss_demux_class_init (GstMssDemuxClass * klass)
+@@ -192,10 +199,15 @@ gst_mss_demux_class_init (GstMssDemuxClass * klass)
+ gst_mss_demux_stream_select_bitrate;
+ gstadaptivedemux_class->stream_update_fragment_info =
+ gst_mss_demux_stream_update_fragment_info;
++ gstadaptivedemux_class->stream_get_fragment_waiting_time =
++ gst_mss_demux_stream_get_fragment_waiting_time;
+ gstadaptivedemux_class->update_manifest_data =
+ gst_mss_demux_update_manifest_data;
+ gstadaptivedemux_class->get_live_seek_range =
+ gst_mss_demux_get_live_seek_range;
++ gstadaptivedemux_class->data_received = gst_mss_demux_data_received;
++ gstadaptivedemux_class->requires_periodical_playlist_update =
++ gst_mss_demux_requires_periodical_playlist_update;
+
+ GST_DEBUG_CATEGORY_INIT (mssdemux_debug, "mssdemux", 0, "mssdemux plugin");
+ }
+@@ -650,6 +662,13 @@ gst_mss_demux_get_manifest_update_interval (GstAdaptiveDemux * demux)
+ return interval;
+ }
+
++static gint64
++gst_mss_demux_stream_get_fragment_waiting_time (GstAdaptiveDemuxStream * stream)
++{
++ /* Wait a second for live streams so we don't try premature fragments downloading */
++ return GST_SECOND;
++}
++
+ static GstFlowReturn
+ gst_mss_demux_update_manifest_data (GstAdaptiveDemux * demux,
+ GstBuffer * buffer)
+@@ -670,3 +689,44 @@ gst_mss_demux_get_live_seek_range (GstAdaptiveDemux * demux, gint64 * start,
+
+ return gst_mss_manifest_get_live_seek_range (mssdemux->manifest, start, stop);
+ }
++
++static GstFlowReturn
++gst_mss_demux_data_received (GstAdaptiveDemux * demux,
++ GstAdaptiveDemuxStream * stream, GstBuffer * buffer)
++{
++ GstMssDemux *mssdemux = GST_MSS_DEMUX_CAST (demux);
++ GstMssDemuxStream *mssstream = (GstMssDemuxStream *) stream;
++ gsize available;
++
++ if (!gst_mss_manifest_is_live (mssdemux->manifest)) {
++ return GST_ADAPTIVE_DEMUX_CLASS (parent_class)->data_received (demux,
++ stream, buffer);
++ }
++
++ if (gst_mss_stream_fragment_parsing_needed (mssstream->manifest_stream)) {
++ gst_mss_manifest_live_adapter_push (mssstream->manifest_stream, buffer);
++ available =
++ gst_mss_manifest_live_adapter_available (mssstream->manifest_stream);
++ // FIXME: try to reduce this minimal size.
++ if (available < 4096) {
++ return GST_FLOW_OK;
++ } else {
++ GST_LOG_OBJECT (stream->pad, "enough data, parsing fragment.");
++ buffer =
++ gst_mss_manifest_live_adapter_take_buffer (mssstream->manifest_stream,
++ available);
++ gst_mss_stream_parse_fragment (mssstream->manifest_stream, buffer);
++ }
++ }
++
++ return GST_ADAPTIVE_DEMUX_CLASS (parent_class)->data_received (demux, stream,
++ buffer);
++}
++
++static gboolean
++gst_mss_demux_requires_periodical_playlist_update (GstAdaptiveDemux * demux)
++{
++ GstMssDemux *mssdemux = GST_MSS_DEMUX_CAST (demux);
++
++ return (!gst_mss_manifest_is_live (mssdemux->manifest));
++}
+diff --git a/ext/smoothstreaming/gstmssfragmentparser.c b/ext/smoothstreaming/gstmssfragmentparser.c
+new file mode 100644
+index 000000000..b554d4f31
+--- /dev/null
++++ b/ext/smoothstreaming/gstmssfragmentparser.c
+@@ -0,0 +1,266 @@
++/*
++ * Microsoft Smooth-Streaming fragment parsing library
++ *
++ * gstmssfragmentparser.h
++ *
++ * Copyright (C) 2016 Igalia S.L
++ * Copyright (C) 2016 Metrological
++ * Author: Philippe Normand <philn@igalia.com>
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Library General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Library General Public License for more details.
++ *
++ * You should have received a copy of the GNU Library General Public
++ * License along with this library (COPYING); if not, write to the
++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++ * Boston, MA 02111-1307, USA.
++ */
++
++#include "gstmssfragmentparser.h"
++#include <gst/base/gstbytereader.h>
++#include <string.h>
++
++GST_DEBUG_CATEGORY_EXTERN (mssdemux_debug);
++#define GST_CAT_DEFAULT mssdemux_debug
++
++void
++gst_mss_fragment_parser_init (GstMssFragmentParser * parser)
++{
++ parser->status = GST_MSS_FRAGMENT_HEADER_PARSER_INIT;
++ parser->tfrf.entries_count = 0;
++}
++
++void
++gst_mss_fragment_parser_clear (GstMssFragmentParser * parser)
++{
++ parser->tfrf.entries_count = 0;
++ if (parser->tfrf.entries) {
++ g_free (parser->tfrf.entries);
++ parser->tfrf.entries = 0;
++ }
++}
++
++static gboolean
++_parse_tfrf_box (GstMssFragmentParser * parser, GstByteReader * reader)
++{
++ guint8 version;
++ guint32 flags = 0;
++ guint8 fragment_count = 0;
++ guint8 index = 0;
++
++ if (!gst_byte_reader_get_uint8 (reader, &version)) {
++ GST_ERROR ("Error getting box's version field");
++ return FALSE;
++ }
++
++ if (!gst_byte_reader_get_uint24_be (reader, &flags)) {
++ GST_ERROR ("Error getting box's flags field");
++ return FALSE;
++ }
++
++ gst_byte_reader_get_uint8 (reader, &fragment_count);
++ parser->tfrf.entries_count = fragment_count;
++ parser->tfrf.entries =
++ g_malloc (sizeof (GstTfrfBoxEntry) * parser->tfrf.entries_count);
++ for (index = 0; index < fragment_count; index++) {
++ guint64 absolute_time = 0;
++ guint64 absolute_duration = 0;
++ if (version & 0x01) {
++ gst_byte_reader_get_uint64_be (reader, &absolute_time);
++ gst_byte_reader_get_uint64_be (reader, &absolute_duration);
++ } else {
++ guint32 time = 0;
++ guint32 duration = 0;
++ gst_byte_reader_get_uint32_be (reader, &time);
++ gst_byte_reader_get_uint32_be (reader, &duration);
++ time = ~time;
++ duration = ~duration;
++ absolute_time = ~time;
++ absolute_duration = ~duration;
++ }
++ parser->tfrf.entries[index].time = absolute_time;
++ parser->tfrf.entries[index].duration = absolute_duration;
++ }
++
++ GST_LOG ("tfrf box parsed");
++ return TRUE;
++}
++
++static gboolean
++_parse_tfxd_box (GstMssFragmentParser * parser, GstByteReader * reader)
++{
++ guint8 version;
++ guint32 flags = 0;
++ guint64 absolute_time = 0;
++ guint64 absolute_duration = 0;
++
++ if (!gst_byte_reader_get_uint8 (reader, &version)) {
++ GST_ERROR ("Error getting box's version field");
++ return FALSE;
++ }
++
++ if (!gst_byte_reader_get_uint24_be (reader, &flags)) {
++ GST_ERROR ("Error getting box's flags field");
++ return FALSE;
++ }
++
++ if (version & 0x01) {
++ gst_byte_reader_get_uint64_be (reader, &absolute_time);
++ gst_byte_reader_get_uint64_be (reader, &absolute_duration);
++ } else {
++ guint32 time = 0;
++ guint32 duration = 0;
++ gst_byte_reader_get_uint32_be (reader, &time);
++ gst_byte_reader_get_uint32_be (reader, &duration);
++ time = ~time;
++ duration = ~duration;
++ absolute_time = ~time;
++ absolute_duration = ~duration;
++ }
++
++ parser->tfxd.time = absolute_time;
++ parser->tfxd.duration = absolute_duration;
++ GST_LOG ("tfxd box parsed");
++ return TRUE;
++}
++
++gboolean
++gst_mss_fragment_parser_add_buffer (GstMssFragmentParser * parser,
++ GstBuffer * buffer)
++{
++ GstByteReader reader;
++ GstMapInfo info;
++ guint32 size;
++ guint32 fourcc;
++ const guint8 *uuid;
++ gboolean error = FALSE;
++ gboolean mdat_box_found = FALSE;
++
++ static const guint8 tfrf_uuid[] = {
++ 0xd4, 0x80, 0x7e, 0xf2, 0xca, 0x39, 0x46, 0x95,
++ 0x8e, 0x54, 0x26, 0xcb, 0x9e, 0x46, 0xa7, 0x9f
++ };
++
++ static const guint8 tfxd_uuid[] = {
++ 0x6d, 0x1d, 0x9b, 0x05, 0x42, 0xd5, 0x44, 0xe6,
++ 0x80, 0xe2, 0x14, 0x1d, 0xaf, 0xf7, 0x57, 0xb2
++ };
++
++ static const guint8 piff_uuid[] = {
++ 0xa2, 0x39, 0x4f, 0x52, 0x5a, 0x9b, 0x4f, 0x14,
++ 0xa2, 0x44, 0x6c, 0x42, 0x7c, 0x64, 0x8d, 0xf4
++ };
++
++ if (!gst_buffer_map (buffer, &info, GST_MAP_READ)) {
++ return FALSE;
++ }
++
++ gst_byte_reader_init (&reader, info.data, info.size);
++ GST_TRACE ("Total buffer size: %u", gst_byte_reader_get_size (&reader));
++
++ size = gst_byte_reader_get_uint32_be_unchecked (&reader);
++ fourcc = gst_byte_reader_get_uint32_le_unchecked (&reader);
++ if (fourcc == GST_MSS_FRAGMENT_FOURCC_MOOF) {
++ GST_TRACE ("moof box found");
++ size = gst_byte_reader_get_uint32_be_unchecked (&reader);
++ fourcc = gst_byte_reader_get_uint32_le_unchecked (&reader);
++ if (fourcc == GST_MSS_FRAGMENT_FOURCC_MFHD) {
++ gst_byte_reader_skip_unchecked (&reader, size - 8);
++
++ size = gst_byte_reader_get_uint32_be_unchecked (&reader);
++ fourcc = gst_byte_reader_get_uint32_le_unchecked (&reader);
++ if (fourcc == GST_MSS_FRAGMENT_FOURCC_TRAF) {
++ size = gst_byte_reader_get_uint32_be_unchecked (&reader);
++ fourcc = gst_byte_reader_get_uint32_le_unchecked (&reader);
++ if (fourcc == GST_MSS_FRAGMENT_FOURCC_TFHD) {
++ gst_byte_reader_skip_unchecked (&reader, size - 8);
++
++ size = gst_byte_reader_get_uint32_be_unchecked (&reader);
++ fourcc = gst_byte_reader_get_uint32_le_unchecked (&reader);
++ if (fourcc == GST_MSS_FRAGMENT_FOURCC_TRUN) {
++ GST_TRACE ("trun box found, size: %" G_GUINT32_FORMAT, size);
++ if (!gst_byte_reader_skip (&reader, size - 8)) {
++ GST_WARNING ("Failed to skip trun box, enough data?");
++ error = TRUE;
++ goto beach;
++ }
++ }
++ }
++ }
++ }
++ }
++
++ while (!mdat_box_found) {
++ GST_TRACE ("remaining data: %u", gst_byte_reader_get_remaining (&reader));
++ if (!gst_byte_reader_get_uint32_be (&reader, &size)) {
++ GST_WARNING ("Failed to get box size, enough data?");
++ error = TRUE;
++ break;
++ }
++
++ GST_TRACE ("box size: %" G_GUINT32_FORMAT, size);
++ if (!gst_byte_reader_get_uint32_le (&reader, &fourcc)) {
++ GST_WARNING ("Failed to get fourcc, enough data?");
++ error = TRUE;
++ break;
++ }
++
++ if (fourcc == GST_MSS_FRAGMENT_FOURCC_MDAT) {
++ GST_LOG ("mdat box found");
++ mdat_box_found = TRUE;
++ break;
++ }
++
++ if (fourcc != GST_MSS_FRAGMENT_FOURCC_UUID) {
++ GST_ERROR ("invalid UUID fourcc: %" GST_FOURCC_FORMAT,
++ GST_FOURCC_ARGS (fourcc));
++ error = TRUE;
++ break;
++ }
++
++ if (!gst_byte_reader_peek_data (&reader, 16, &uuid)) {
++ GST_ERROR ("not enough data in UUID box");
++ error = TRUE;
++ break;
++ }
++
++ if (memcmp (uuid, piff_uuid, 16) == 0) {
++ gst_byte_reader_skip_unchecked (&reader, size - 8);
++ GST_LOG ("piff box detected");
++ }
++
++ if (memcmp (uuid, tfrf_uuid, 16) == 0) {
++ gst_byte_reader_get_data (&reader, 16, &uuid);
++ if (!_parse_tfrf_box (parser, &reader)) {
++ GST_ERROR ("txrf box parsing error");
++ error = TRUE;
++ break;
++ }
++ }
++
++ if (memcmp (uuid, tfxd_uuid, 16) == 0) {
++ gst_byte_reader_get_data (&reader, 16, &uuid);
++ if (!_parse_tfxd_box (parser, &reader)) {
++ GST_ERROR ("tfrf box parsing error");
++ error = TRUE;
++ break;
++ }
++ }
++ }
++
++beach:
++
++ if (!error)
++ parser->status = GST_MSS_FRAGMENT_HEADER_PARSER_FINISHED;
++
++ GST_LOG ("Fragment parsing successful: %s", error ? "no" : "yes");
++ gst_buffer_unmap (buffer, &info);
++ return !error;
++}
+diff --git a/ext/smoothstreaming/gstmssfragmentparser.h b/ext/smoothstreaming/gstmssfragmentparser.h
+new file mode 100644
+index 000000000..cf4711865
+--- /dev/null
++++ b/ext/smoothstreaming/gstmssfragmentparser.h
+@@ -0,0 +1,84 @@
++/*
++ * Microsoft Smooth-Streaming fragment parsing library
++ *
++ * gstmssfragmentparser.h
++ *
++ * Copyright (C) 2016 Igalia S.L
++ * Copyright (C) 2016 Metrological
++ * Author: Philippe Normand <philn@igalia.com>
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Library General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Library General Public License for more details.
++ *
++ * You should have received a copy of the GNU Library General Public
++ * License along with this library (COPYING); if not, write to the
++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++ * Boston, MA 02111-1307, USA.
++ */
++
++#ifndef __GST_MSS_FRAGMENT_PARSER_H__
++#define __GST_MSS_FRAGMENT_PARSER_H__
++
++#include <gst/gst.h>
++
++G_BEGIN_DECLS
++
++#define GST_MSS_FRAGMENT_FOURCC_MOOF GST_MAKE_FOURCC('m','o','o','f')
++#define GST_MSS_FRAGMENT_FOURCC_MFHD GST_MAKE_FOURCC('m','f','h','d')
++#define GST_MSS_FRAGMENT_FOURCC_TRAF GST_MAKE_FOURCC('t','r','a','f')
++#define GST_MSS_FRAGMENT_FOURCC_TFHD GST_MAKE_FOURCC('t','f','h','d')
++#define GST_MSS_FRAGMENT_FOURCC_TRUN GST_MAKE_FOURCC('t','r','u','n')
++#define GST_MSS_FRAGMENT_FOURCC_UUID GST_MAKE_FOURCC('u','u','i','d')
++#define GST_MSS_FRAGMENT_FOURCC_MDAT GST_MAKE_FOURCC('m','d','a','t')
++
++typedef struct _GstTfxdBox
++{
++ guint8 version;
++ guint32 flags;
++
++ guint64 time;
++ guint64 duration;
++} GstTfxdBox;
++
++typedef struct _GstTfrfBoxEntry
++{
++ guint64 time;
++ guint64 duration;
++} GstTfrfBoxEntry;
++
++typedef struct _GstTfrfBox
++{
++ guint8 version;
++ guint32 flags;
++
++ gint entries_count;
++ GstTfrfBoxEntry *entries;
++} GstTfrfBox;
++
++typedef enum _GstFragmentHeaderParserStatus
++{
++ GST_MSS_FRAGMENT_HEADER_PARSER_INIT,
++ GST_MSS_FRAGMENT_HEADER_PARSER_FINISHED
++} GstFragmentHeaderParserStatus;
++
++typedef struct _GstMssFragmentParser
++{
++ GstFragmentHeaderParserStatus status;
++ GstTfxdBox tfxd;
++ GstTfrfBox tfrf;
++} GstMssFragmentParser;
++
++void gst_mss_fragment_parser_init (GstMssFragmentParser * parser);
++void gst_mss_fragment_parser_clear (GstMssFragmentParser * parser);
++gboolean gst_mss_fragment_parser_add_buffer (GstMssFragmentParser * parser, GstBuffer * buf);
++
++G_END_DECLS
++
++#endif /* __GST_MSS_FRAGMENT_PARSER_H__ */
+diff --git a/ext/smoothstreaming/gstmssmanifest.c b/ext/smoothstreaming/gstmssmanifest.c
+index 144bbb42d..e1031ba55 100644
+--- a/ext/smoothstreaming/gstmssmanifest.c
++++ b/ext/smoothstreaming/gstmssmanifest.c
+@@ -1,5 +1,7 @@
+ /* GStreamer
+ * Copyright (C) 2012 Smart TV Alliance
++ * Copyright (C) 2016 Igalia S.L
++ * Copyright (C) 2016 Metrological
+ * Author: Thiago Sousa Santos <thiago.sousa.santos@collabora.com>, Collabora Ltd.
+ *
+ * gstmssmanifest.c:
+@@ -31,6 +33,7 @@
+ #include <gst/codecparsers/gsth264parser.h>
+
+ #include "gstmssmanifest.h"
++#include "gstmssfragmentparser.h"
+
+ GST_DEBUG_CATEGORY_EXTERN (mssdemux_debug);
+ #define GST_CAT_DEFAULT mssdemux_debug
+@@ -74,12 +77,17 @@ struct _GstMssStream
+ gboolean active; /* if the stream is currently being used */
+ gint selectedQualityIndex;
+
++ gboolean has_live_fragments;
++ GstAdapter *live_adapter;
++
+ GList *fragments;
+ GList *qualities;
+
+ gchar *url;
+ gchar *lang;
+
++ GstMssFragmentParser fragment_parser;
++
+ guint fragment_repetition_index;
+ GList *current_fragment;
+ GList *current_quality;
+@@ -96,6 +104,7 @@ struct _GstMssManifest
+
+ gboolean is_live;
+ gint64 dvr_window;
++ guint64 look_ahead_fragment_count;
+
+ GString *protection_system_id;
+ gchar *protection_data;
+@@ -235,7 +244,8 @@ compare_bitrate (GstMssStreamQuality * a, GstMssStreamQuality * b)
+ }
+
+ static void
+-_gst_mss_stream_init (GstMssStream * stream, xmlNodePtr node)
++_gst_mss_stream_init (GstMssManifest * manifest, GstMssStream * stream,
++ xmlNodePtr node)
+ {
+ xmlNodePtr iter;
+ GstMssFragmentListBuilder builder;
+@@ -248,9 +258,21 @@ _gst_mss_stream_init (GstMssStream * stream, xmlNodePtr node)
+ stream->url = (gchar *) xmlGetProp (node, (xmlChar *) MSS_PROP_URL);
+ stream->lang = (gchar *) xmlGetProp (node, (xmlChar *) MSS_PROP_LANGUAGE);
+
++ /* for live playback each fragment usually has timing
++ * information for the few next look-ahead fragments so the
++ * playlist can be built incrementally from the first fragment
++ * of the manifest.
++ */
++
++ GST_DEBUG ("Live stream: %s, look-ahead fragments: %" G_GUINT64_FORMAT,
++ manifest->is_live ? "yes" : "no", manifest->look_ahead_fragment_count);
++ stream->has_live_fragments = manifest->is_live
++ && manifest->look_ahead_fragment_count;
++
+ for (iter = node->children; iter; iter = iter->next) {
+ if (node_has_type (iter, MSS_NODE_STREAM_FRAGMENT)) {
+- gst_mss_fragment_list_builder_add (&builder, iter);
++ if (!stream->has_live_fragments || !builder.fragments)
++ gst_mss_fragment_list_builder_add (&builder, iter);
+ } else if (node_has_type (iter, MSS_NODE_STREAM_QUALITY)) {
+ GstMssStreamQuality *quality = gst_mss_stream_quality_new (iter);
+ stream->qualities = g_list_prepend (stream->qualities, quality);
+@@ -259,17 +281,24 @@ _gst_mss_stream_init (GstMssStream * stream, xmlNodePtr node)
+ }
+ }
+
+- stream->fragments = g_list_reverse (builder.fragments);
++ if (stream->has_live_fragments) {
++ stream->live_adapter = gst_adapter_new ();
++ }
++
++ if (builder.fragments) {
++ stream->fragments = g_list_reverse (builder.fragments);
++ stream->current_fragment = stream->fragments;
++ }
+
+ /* order them from smaller to bigger based on bitrates */
+ stream->qualities =
+ g_list_sort (stream->qualities, (GCompareFunc) compare_bitrate);
+-
+- stream->current_fragment = stream->fragments;
+ stream->current_quality = stream->qualities;
+
+ stream->regex_bitrate = g_regex_new ("\\{[Bb]itrate\\}", 0, 0, NULL);
+ stream->regex_position = g_regex_new ("\\{start[ _]time\\}", 0, 0, NULL);
++
++ gst_mss_fragment_parser_init (&stream->fragment_parser);
+ }
+
+
+@@ -315,6 +344,7 @@ gst_mss_manifest_new (GstBuffer * data)
+ xmlNodePtr nodeiter;
+ gchar *live_str;
+ GstMapInfo mapinfo;
++ gchar *look_ahead_fragment_count_str;
+
+ if (!gst_buffer_map (data, &mapinfo, GST_MAP_READ)) {
+ return NULL;
+@@ -335,6 +365,7 @@ gst_mss_manifest_new (GstBuffer * data)
+ /* the entire file is always available for non-live streams */
+ if (!manifest->is_live) {
+ manifest->dvr_window = 0;
++ manifest->look_ahead_fragment_count = 0;
+ } else {
+ /* if 0, or non-existent, the length is infinite */
+ gchar *dvr_window_str = (gchar *) xmlGetProp (root,
+@@ -346,6 +377,17 @@ gst_mss_manifest_new (GstBuffer * data)
+ manifest->dvr_window = 0;
+ }
+ }
++
++ look_ahead_fragment_count_str =
++ (gchar *) xmlGetProp (root, (xmlChar *) "LookAheadFragmentCount");
++ if (look_ahead_fragment_count_str) {
++ manifest->look_ahead_fragment_count =
++ g_ascii_strtoull (look_ahead_fragment_count_str, NULL, 10);
++ xmlFree (look_ahead_fragment_count_str);
++ if (manifest->look_ahead_fragment_count <= 0) {
++ manifest->look_ahead_fragment_count = 0;
++ }
++ }
+ }
+
+ for (nodeiter = root->children; nodeiter; nodeiter = nodeiter->next) {
+@@ -354,7 +396,7 @@ gst_mss_manifest_new (GstBuffer * data)
+ GstMssStream *stream = g_new0 (GstMssStream, 1);
+
+ manifest->streams = g_slist_append (manifest->streams, stream);
+- _gst_mss_stream_init (stream, nodeiter);
++ _gst_mss_stream_init (manifest, stream, nodeiter);
+ }
+
+ if (nodeiter->type == XML_ELEMENT_NODE
+@@ -371,6 +413,11 @@ gst_mss_manifest_new (GstBuffer * data)
+ static void
+ gst_mss_stream_free (GstMssStream * stream)
+ {
++ if (stream->live_adapter) {
++ gst_adapter_clear (stream->live_adapter);
++ g_object_unref (stream->live_adapter);
++ }
++
+ g_list_free_full (stream->fragments, g_free);
+ g_list_free_full (stream->qualities,
+ (GDestroyNotify) gst_mss_stream_quality_free);
+@@ -379,6 +426,7 @@ gst_mss_stream_free (GstMssStream * stream)
+ g_regex_unref (stream->regex_position);
+ g_regex_unref (stream->regex_bitrate);
+ g_free (stream);
++ gst_mss_fragment_parser_clear (&stream->fragment_parser);
+ }
+
+ void
+@@ -1079,6 +1127,9 @@ GstFlowReturn
+ gst_mss_stream_advance_fragment (GstMssStream * stream)
+ {
+ GstMssStreamFragment *fragment;
++ const gchar *stream_type_name =
++ gst_mss_stream_type_name (gst_mss_stream_get_type (stream));
++
+ g_return_val_if_fail (stream->active, GST_FLOW_ERROR);
+
+ if (stream->current_fragment == NULL)
+@@ -1086,14 +1137,20 @@ gst_mss_stream_advance_fragment (GstMssStream * stream)
+
+ fragment = stream->current_fragment->data;
+ stream->fragment_repetition_index++;
+- if (stream->fragment_repetition_index < fragment->repetitions) {
+- return GST_FLOW_OK;
+- }
++ if (stream->fragment_repetition_index < fragment->repetitions)
++ goto beach;
+
+ stream->fragment_repetition_index = 0;
+ stream->current_fragment = g_list_next (stream->current_fragment);
++
++ GST_DEBUG ("Advanced to fragment #%d on %s stream", fragment->number,
++ stream_type_name);
+ if (stream->current_fragment == NULL)
+ return GST_FLOW_EOS;
++
++beach:
++ gst_mss_fragment_parser_clear (&stream->fragment_parser);
++ gst_mss_fragment_parser_init (&stream->fragment_parser);
+ return GST_FLOW_OK;
+ }
+
+@@ -1173,6 +1230,11 @@ gst_mss_stream_seek (GstMssStream * stream, gboolean forward,
+ GST_DEBUG ("Stream %s seeking to %" G_GUINT64_FORMAT, stream->url, time);
+ for (iter = stream->fragments; iter; iter = g_list_next (iter)) {
+ fragment = iter->data;
++ if (stream->has_live_fragments) {
++ if (fragment->time + fragment->repetitions * fragment->duration > time)
++ stream->current_fragment = iter;
++ break;
++ }
+ if (fragment->time + fragment->repetitions * fragment->duration > time) {
+ stream->current_fragment = iter;
+ stream->fragment_repetition_index =
+@@ -1256,9 +1318,14 @@ static void
+ gst_mss_stream_reload_fragments (GstMssStream * stream, xmlNodePtr streamIndex)
+ {
+ xmlNodePtr iter;
+- guint64 current_gst_time = gst_mss_stream_get_fragment_gst_timestamp (stream);
++ guint64 current_gst_time;
+ GstMssFragmentListBuilder builder;
+
++ if (stream->has_live_fragments)
++ return;
++
++ current_gst_time = gst_mss_stream_get_fragment_gst_timestamp (stream);
++
+ gst_mss_fragment_list_builder_init (&builder);
+
+ GST_DEBUG ("Current position: %" GST_TIME_FORMAT,
+@@ -1514,3 +1581,74 @@ gst_mss_manifest_get_live_seek_range (GstMssManifest * manifest, gint64 * start,
+
+ return ret;
+ }
++
++void
++gst_mss_manifest_live_adapter_push (GstMssStream * stream, GstBuffer * buffer)
++{
++ gst_adapter_push (stream->live_adapter, buffer);
++}
++
++gsize
++gst_mss_manifest_live_adapter_available (GstMssStream * stream)
++{
++ return gst_adapter_available (stream->live_adapter);
++}
++
++GstBuffer *
++gst_mss_manifest_live_adapter_take_buffer (GstMssStream * stream, gsize nbytes)
++{
++ return gst_adapter_take_buffer (stream->live_adapter, nbytes);
++}
++
++gboolean
++gst_mss_stream_fragment_parsing_needed (GstMssStream * stream)
++{
++ return stream->fragment_parser.status == GST_MSS_FRAGMENT_HEADER_PARSER_INIT;
++}
++
++void
++gst_mss_stream_parse_fragment (GstMssStream * stream, GstBuffer * buffer)
++{
++ GstMssStreamFragment *current_fragment = NULL;
++ const gchar *stream_type_name;
++ guint8 index;
++
++ if (!stream->has_live_fragments)
++ return;
++
++ if (!gst_mss_fragment_parser_add_buffer (&stream->fragment_parser, buffer))
++ return;
++
++ current_fragment = stream->current_fragment->data;
++ current_fragment->time = stream->fragment_parser.tfxd.time;
++ current_fragment->duration = stream->fragment_parser.tfxd.duration;
++
++ stream_type_name =
++ gst_mss_stream_type_name (gst_mss_stream_get_type (stream));
++
++ for (index = 0; index < stream->fragment_parser.tfrf.entries_count; index++) {
++ GList *l = g_list_last (stream->fragments);
++ GstMssStreamFragment *last;
++ GstMssStreamFragment *fragment;
++
++ if (l == NULL)
++ break;
++
++ last = (GstMssStreamFragment *) l->data;
++
++ if (last->time == stream->fragment_parser.tfrf.entries[index].time)
++ continue;
++
++ fragment = g_new (GstMssStreamFragment, 1);
++ fragment->number = last->number + 1;
++ fragment->repetitions = 1;
++ fragment->time = stream->fragment_parser.tfrf.entries[index].time;
++ fragment->duration = stream->fragment_parser.tfrf.entries[index].duration;
++
++ stream->fragments = g_list_append (stream->fragments, fragment);
++ GST_LOG ("Adding fragment number: %u to %s stream, time: %" G_GUINT64_FORMAT
++ ", duration: %" G_GUINT64_FORMAT ", repetitions: %u",
++ fragment->number, stream_type_name,
++ fragment->time, fragment->duration, fragment->repetitions);
++ }
++}
+diff --git a/ext/smoothstreaming/gstmssmanifest.h b/ext/smoothstreaming/gstmssmanifest.h
+index 6b7b1f971..03b066ae5 100644
+--- a/ext/smoothstreaming/gstmssmanifest.h
++++ b/ext/smoothstreaming/gstmssmanifest.h
+@@ -26,6 +26,7 @@
+ #include <glib.h>
+ #include <gio/gio.h>
+ #include <gst/gst.h>
++#include <gst/base/gstadapter.h>
+
+ G_BEGIN_DECLS
+
+@@ -73,5 +74,11 @@ const gchar * gst_mss_stream_get_lang (GstMssStream * stream);
+
+ const gchar * gst_mss_stream_type_name (GstMssStreamType streamtype);
+
++void gst_mss_manifest_live_adapter_push(GstMssStream * stream, GstBuffer * buffer);
++gsize gst_mss_manifest_live_adapter_available(GstMssStream * stream);
++GstBuffer * gst_mss_manifest_live_adapter_take_buffer(GstMssStream * stream, gsize nbytes);
++gboolean gst_mss_stream_fragment_parsing_needed(GstMssStream * stream);
++void gst_mss_stream_parse_fragment(GstMssStream * stream, GstBuffer * buffer);
++
+ G_END_DECLS
+ #endif /* __GST_MSS_MANIFEST_H__ */
+diff --git a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c
+index 634e4f388..ddca726b6 100644
+--- a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c
++++ b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c
+@@ -291,6 +291,9 @@ gst_adaptive_demux_wait_until (GstClock * clock, GCond * cond, GMutex * mutex,
+ GstClockTime end_time);
+ static gboolean gst_adaptive_demux_clock_callback (GstClock * clock,
+ GstClockTime time, GstClockID id, gpointer user_data);
++static gboolean
++gst_adaptive_demux_requires_periodical_playlist_update_default (GstAdaptiveDemux
++ * demux);
+
+ /* we can't use G_DEFINE_ABSTRACT_TYPE because we need the klass in the _init
+ * method to get to the padtemplates */
+@@ -412,6 +415,9 @@ gst_adaptive_demux_class_init (GstAdaptiveDemuxClass * klass)
+ klass->data_received = gst_adaptive_demux_stream_data_received_default;
+ klass->finish_fragment = gst_adaptive_demux_stream_finish_fragment_default;
+ klass->update_manifest = gst_adaptive_demux_update_manifest_default;
++ klass->requires_periodical_playlist_update =
++ gst_adaptive_demux_requires_periodical_playlist_update_default;
++
+ }
+
+ static void
+@@ -686,7 +692,9 @@ gst_adaptive_demux_sink_event (GstPad * pad, GstObject * parent,
+ demux->priv->stop_updates_task = FALSE;
+ g_mutex_unlock (&demux->priv->updates_timed_lock);
+ /* Task to periodically update the manifest */
+- gst_task_start (demux->priv->updates_task);
++ if (demux_class->requires_periodical_playlist_update (demux)) {
++ gst_task_start (demux->priv->updates_task);
++ }
+ }
+ } else {
+ /* no streams */
+@@ -2125,6 +2133,13 @@ gst_adaptive_demux_stream_data_received_default (GstAdaptiveDemux * demux,
+ return gst_adaptive_demux_stream_push_buffer (stream, buffer);
+ }
+
++static gboolean
++gst_adaptive_demux_requires_periodical_playlist_update_default (GstAdaptiveDemux
++ * demux)
++{
++ return TRUE;
++}
++
+ static GstFlowReturn
+ _src_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
+ {
+@@ -3338,7 +3353,15 @@ gst_adaptive_demux_stream_download_loop (GstAdaptiveDemuxStream * stream)
+ GST_DEBUG_OBJECT (stream->pad, "EOS, checking to stop download loop");
+ /* we push the EOS after releasing the object lock */
+ if (gst_adaptive_demux_is_live (demux)) {
+- if (gst_adaptive_demux_stream_wait_manifest_update (demux, stream)) {
++ GstAdaptiveDemuxClass *demux_class =
++ GST_ADAPTIVE_DEMUX_GET_CLASS (demux);
++
++ /* this might be a fragment download error, refresh the manifest, just in case */
++ if (!demux_class->requires_periodical_playlist_update (demux)) {
++ ret = gst_adaptive_demux_update_manifest (demux);
++ break;
++ } else if (gst_adaptive_demux_stream_wait_manifest_update (demux,
++ stream)) {
+ goto end;
+ }
+ gst_task_stop (stream->download_task);
+diff --git a/gst-libs/gst/adaptivedemux/gstadaptivedemux.h b/gst-libs/gst/adaptivedemux/gstadaptivedemux.h
+index 780f4d93f..9a1a1b7d1 100644
+--- a/gst-libs/gst/adaptivedemux/gstadaptivedemux.h
++++ b/gst-libs/gst/adaptivedemux/gstadaptivedemux.h
+@@ -459,6 +459,20 @@ struct _GstAdaptiveDemuxClass
+ * selected period.
+ */
+ GstClockTime (*get_period_start_time) (GstAdaptiveDemux *demux);
++
++ /**
++ * requires_periodical_playlist_update:
++ * @demux: #GstAdaptiveDemux
++ *
++ * Some adaptive streaming protocols allow the client to download
++ * the playlist once and build up the fragment list based on the
++ * current fragment metadata. For those protocols the demuxer
++ * doesn't need to periodically refresh the playlist. This vfunc
++ * is relevant only for live playback scenarios.
++ *
++ * Return: %TRUE if the playlist needs to be refreshed periodically by the demuxer.
++ */
++ gboolean (*requires_periodical_playlist_update) (GstAdaptiveDemux * demux);
+ };
+
+ GType gst_adaptive_demux_get_type (void);
+--
+2.11.0
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-smoothstreaming-implement-adaptivedemux-s-get_live_s.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-smoothstreaming-implement-adaptivedemux-s-get_live_s.patch
new file mode 100644
index 0000000000..76d29e151b
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-smoothstreaming-implement-adaptivedemux-s-get_live_s.patch
@@ -0,0 +1,183 @@
+From e9178fa082116d4bf733b184a8b6951112c17900 Mon Sep 17 00:00:00 2001
+From: Matthew Waters <matthew@centricular.com>
+Date: Thu, 10 Nov 2016 17:18:36 +1100
+Subject: [PATCH] smoothstreaming: implement adaptivedemux's
+ get_live_seek_range()
+
+Allows seeking through the available fragments that are still available
+on the server as specified by the DVRWindowLength attribute in the
+manifest.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=774178
+---
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+ ext/smoothstreaming/gstmssdemux.c | 13 ++++++
+ ext/smoothstreaming/gstmssmanifest.c | 84 ++++++++++++++++++++++++++++++++++++
+ ext/smoothstreaming/gstmssmanifest.h | 1 +
+ 3 files changed, 98 insertions(+)
+
+diff --git a/ext/smoothstreaming/gstmssdemux.c b/ext/smoothstreaming/gstmssdemux.c
+index 9d0aece2b..b66e19514 100644
+--- a/ext/smoothstreaming/gstmssdemux.c
++++ b/ext/smoothstreaming/gstmssdemux.c
+@@ -138,6 +138,8 @@ gst_mss_demux_get_manifest_update_interval (GstAdaptiveDemux * demux);
+ static GstFlowReturn
+ gst_mss_demux_update_manifest_data (GstAdaptiveDemux * demux,
+ GstBuffer * buffer);
++static gboolean gst_mss_demux_get_live_seek_range (GstAdaptiveDemux * demux,
++ gint64 * start, gint64 * stop);
+
+ static void
+ gst_mss_demux_class_init (GstMssDemuxClass * klass)
+@@ -192,6 +194,8 @@ gst_mss_demux_class_init (GstMssDemuxClass * klass)
+ gst_mss_demux_stream_update_fragment_info;
+ gstadaptivedemux_class->update_manifest_data =
+ gst_mss_demux_update_manifest_data;
++ gstadaptivedemux_class->get_live_seek_range =
++ gst_mss_demux_get_live_seek_range;
+
+ GST_DEBUG_CATEGORY_INIT (mssdemux_debug, "mssdemux", 0, "mssdemux plugin");
+ }
+@@ -659,3 +663,12 @@ gst_mss_demux_update_manifest_data (GstAdaptiveDemux * demux,
+ gst_mss_manifest_reload_fragments (mssdemux->manifest, buffer);
+ return GST_FLOW_OK;
+ }
++
++static gboolean
++gst_mss_demux_get_live_seek_range (GstAdaptiveDemux * demux, gint64 * start,
++ gint64 * stop)
++{
++ GstMssDemux *mssdemux = GST_MSS_DEMUX_CAST (demux);
++
++ return gst_mss_manifest_get_live_seek_range (mssdemux->manifest, start, stop);
++}
+diff --git a/ext/smoothstreaming/gstmssmanifest.c b/ext/smoothstreaming/gstmssmanifest.c
+index 1b72e8de1..317b3cef9 100644
+--- a/ext/smoothstreaming/gstmssmanifest.c
++++ b/ext/smoothstreaming/gstmssmanifest.c
+@@ -42,6 +42,7 @@ GST_DEBUG_CATEGORY_EXTERN (mssdemux_debug);
+
+ #define MSS_PROP_BITRATE "Bitrate"
+ #define MSS_PROP_DURATION "d"
++#define MSS_PROP_DVR_WINDOW_LENGTH "DVRWindowLength"
+ #define MSS_PROP_LANGUAGE "Language"
+ #define MSS_PROP_NUMBER "n"
+ #define MSS_PROP_REPETITIONS "r"
+@@ -94,6 +95,7 @@ struct _GstMssManifest
+ xmlNodePtr xmlrootnode;
+
+ gboolean is_live;
++ gint64 dvr_window;
+
+ GString *protection_system_id;
+ gchar *protection_data;
+@@ -330,6 +332,22 @@ gst_mss_manifest_new (GstBuffer * data)
+ xmlFree (live_str);
+ }
+
++ /* the entire file is always available for non-live streams */
++ if (!manifest->is_live) {
++ manifest->dvr_window = 0;
++ } else {
++ /* if 0, or non-existent, the length is infinite */
++ gchar *dvr_window_str = (gchar *) xmlGetProp (root,
++ (xmlChar *) MSS_PROP_DVR_WINDOW_LENGTH);
++ if (dvr_window_str) {
++ manifest->dvr_window = g_ascii_strtoull (dvr_window_str, NULL, 10);
++ xmlFree (dvr_window_str);
++ if (manifest->dvr_window <= 0) {
++ manifest->dvr_window = 0;
++ }
++ }
++ }
++
+ for (nodeiter = root->children; nodeiter; nodeiter = nodeiter->next) {
+ if (nodeiter->type == XML_ELEMENT_NODE
+ && (strcmp ((const char *) nodeiter->name, "StreamIndex") == 0)) {
+@@ -1406,3 +1424,69 @@ gst_mss_stream_get_lang (GstMssStream * stream)
+ {
+ return stream->lang;
+ }
++
++static GstClockTime
++gst_mss_manifest_get_dvr_window_length_clock_time (GstMssManifest * manifest)
++{
++ gint64 timescale;
++
++ /* the entire file is always available for non-live streams */
++ if (manifest->dvr_window == 0)
++ return GST_CLOCK_TIME_NONE;
++
++ timescale = gst_mss_manifest_get_timescale (manifest);
++ return (GstClockTime) gst_util_uint64_scale_round (manifest->dvr_window,
++ GST_SECOND, timescale);
++}
++
++static gboolean
++gst_mss_stream_get_live_seek_range (GstMssStream * stream, gint64 * start,
++ gint64 * stop)
++{
++ GList *l;
++ GstMssStreamFragment *fragment;
++ guint64 timescale = gst_mss_stream_get_timescale (stream);
++
++ g_return_val_if_fail (stream->active, FALSE);
++
++ /* XXX: assumes all the data in the stream is still available */
++ l = g_list_first (stream->fragments);
++ fragment = (GstMssStreamFragment *) l->data;
++ *start = gst_util_uint64_scale_round (fragment->time, GST_SECOND, timescale);
++
++ l = g_list_last (stream->fragments);
++ fragment = (GstMssStreamFragment *) l->data;
++ *stop = gst_util_uint64_scale_round (fragment->time + fragment->duration *
++ fragment->repetitions, GST_SECOND, timescale);
++
++ return TRUE;
++}
++
++gboolean
++gst_mss_manifest_get_live_seek_range (GstMssManifest * manifest, gint64 * start,
++ gint64 * stop)
++{
++ GSList *iter;
++ gboolean ret = FALSE;
++
++ for (iter = manifest->streams; iter; iter = g_slist_next (iter)) {
++ GstMssStream *stream = iter->data;
++
++ if (stream->active) {
++ /* FIXME: bound this correctly for multiple streams */
++ if (!(ret = gst_mss_stream_get_live_seek_range (stream, start, stop)))
++ break;
++ }
++ }
++
++ if (ret && gst_mss_manifest_is_live (manifest)) {
++ GstClockTime dvr_window =
++ gst_mss_manifest_get_dvr_window_length_clock_time (manifest);
++
++ if (GST_CLOCK_TIME_IS_VALID (dvr_window) && *stop - *start > dvr_window) {
++ *start = *stop - dvr_window;
++ }
++ }
++
++ return ret;
++}
+diff --git a/ext/smoothstreaming/gstmssmanifest.h b/ext/smoothstreaming/gstmssmanifest.h
+index af7419c23..6b7b1f971 100644
+--- a/ext/smoothstreaming/gstmssmanifest.h
++++ b/ext/smoothstreaming/gstmssmanifest.h
+@@ -54,6 +54,7 @@ void gst_mss_manifest_reload_fragments (GstMssManifest * manifest, GstBuffer * d
+ GstClockTime gst_mss_manifest_get_min_fragment_duration (GstMssManifest * manifest);
+ const gchar * gst_mss_manifest_get_protection_system_id (GstMssManifest * manifest);
+ const gchar * gst_mss_manifest_get_protection_data (GstMssManifest * manifest);
++gboolean gst_mss_manifest_get_live_seek_range (GstMssManifest * manifest, gint64 * start, gint64 * stop);
+
+ GstMssStreamType gst_mss_stream_get_type (GstMssStream *stream);
+ GstCaps * gst_mss_stream_get_caps (GstMssStream * stream);
+--
+2.11.0
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-smoothstreaming-use-the-duration-from-the-list-of-fr.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-smoothstreaming-use-the-duration-from-the-list-of-fr.patch
new file mode 100644
index 0000000000..4e51040863
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-smoothstreaming-use-the-duration-from-the-list-of-fr.patch
@@ -0,0 +1,62 @@
+From 0fbee8f37427b88339194b22ba9aa210772a8613 Mon Sep 17 00:00:00 2001
+From: Matthew Waters <matthew@centricular.com>
+Date: Thu, 10 Nov 2016 17:20:27 +1100
+Subject: [PATCH] smoothstreaming: use the duration from the list of fragments
+ if not present in the manifest
+
+Provides a more accurate duration for live streams that may be minutes
+or hours in front of the earliest fragment.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=774178
+---
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+ ext/smoothstreaming/gstmssmanifest.c | 24 ++++++++++++++++++++++++
+ 1 file changed, 24 insertions(+)
+
+diff --git a/ext/smoothstreaming/gstmssmanifest.c b/ext/smoothstreaming/gstmssmanifest.c
+index 317b3cef9..144bbb42d 100644
+--- a/ext/smoothstreaming/gstmssmanifest.c
++++ b/ext/smoothstreaming/gstmssmanifest.c
+@@ -888,6 +888,7 @@ gst_mss_manifest_get_duration (GstMssManifest * manifest)
+ gchar *duration;
+ guint64 dur = -1;
+
++ /* try the property */
+ duration =
+ (gchar *) xmlGetProp (manifest->xmlrootnode,
+ (xmlChar *) MSS_PROP_STREAM_DURATION);
+@@ -895,6 +896,29 @@ gst_mss_manifest_get_duration (GstMssManifest * manifest)
+ dur = g_ascii_strtoull (duration, NULL, 10);
+ xmlFree (duration);
+ }
++ /* else use the fragment list */
++ if (dur <= 0) {
++ guint64 max_dur = 0;
++ GSList *iter;
++
++ for (iter = manifest->streams; iter; iter = g_slist_next (iter)) {
++ GstMssStream *stream = iter->data;
++
++ if (stream->active) {
++ if (stream->fragments) {
++ GList *l = g_list_last (stream->fragments);
++ GstMssStreamFragment *fragment = (GstMssStreamFragment *) l->data;
++ guint64 frag_dur =
++ fragment->time + fragment->duration * fragment->repetitions;
++ max_dur = MAX (frag_dur, max_dur);
++ }
++ }
++ }
++
++ if (max_dur != 0)
++ dur = max_dur;
++ }
++
+ return dur;
+ }
+
+--
+2.11.0
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.2.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.2.bb
index e257a589ad..9bcc15f522 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.2.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.2.bb
@@ -15,6 +15,9 @@ SRC_URI = " \
file://0009-glimagesink-Downrank-to-marginal.patch \
file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
file://0001-Prepend-PKG_CONFIG_SYSROOT_DIR-to-pkg-config-output.patch \
+ file://0001-smoothstreaming-implement-adaptivedemux-s-get_live_s.patch \
+ file://0001-smoothstreaming-use-the-duration-from-the-list-of-fr.patch \
+ file://0001-mssdemux-improved-live-playback-support.patch \
"
SRC_URI[md5sum] = "823f4c33fe27c61332c0122273217988"
SRC_URI[sha256sum] = "0795ca9303a99cc7e44dda0e6e18524de02b39892e4b68eaba488f7b9db53a3a"
--
2.11.0
^ permalink raw reply related
* Re: [PATCH v5] rootfs: Modify RPM installation
From: David Vincent @ 2016-12-22 8:22 UTC (permalink / raw)
To: Burton, Ross; +Cc: Plascencia, Daniela, OE-core
In-Reply-To: <CAJTo0LY4H-09bkCySm_MajvxSqDEHpTUNTiQy4uOHxJjNQWNNA@mail.gmail.com>
On mardi 20 décembre 2016 17:44:54 CET Burton, Ross wrote:
> This breaks list_pkgs() for the RPM backend. Instead of returning a list of
> packages, rpm just says "%dbpath is not defined" (or words to that effect,
> as the log disappeared in 100 pages of errors).
>
> Ross
>
OK, I found the bug. I also modified the rpm recipe in another layer using a
bbappend, but now I must include these changes in this patch. I'll resend this
ASAP with the change.
Sorry for the inconvenience,
David
^ permalink raw reply
* Re: [oe-commits] [openembedded-core] 07/63: mesa: update to 13.0.2
From: Martin Jansa @ 2016-12-22 8:39 UTC (permalink / raw)
To: openembedded-core, Andreas Müller; +Cc: openembedded-commits
In-Reply-To: <20161213225620.32205501DD@opal.openembedded.org>
[-- Attachment #1: Type: text/plain, Size: 3103 bytes --]
On Tue, Dec 13, 2016 at 10:56:25PM +0000, git@git.openembedded.org wrote:
> rpurdie pushed a commit to branch master
> in repository openembedded-core.
>
> commit 0b3e3415c51dd534d8fc585ea1e3916375ddcc66
> Author: Andreas Müller <schnitzeltony@googlemail.com>
> AuthorDate: Tue Dec 6 01:19:17 2016 +0100
>
> mesa: update to 13.0.2
>
> Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
> Signed-off-by: Ross Burton <ross.burton@intel.com>
There are couple QA issues in mesa now:
mesa-13.0.2: mesa: Files/directories were installed but not shipped in
any package:
/usr/lib/vdpau/libvdpau_r300.so.1.0.0
/usr/lib/vdpau/libvdpau_nouveau.so.1.0.0
/usr/lib/vdpau/libvdpau_nouveau.so.1.0
/usr/lib/vdpau/libvdpau_nouveau.so.1
/usr/lib/vdpau/libvdpau_nouveau.so
/usr/lib/vdpau/libvdpau_r300.so.1.0
/usr/lib/vdpau/libvdpau_r300.so.1
/usr/lib/vdpau/libvdpau_r300.so
Please set FILES such that these items are packaged. Alternatively if
they are unneeded, avoid installing them or delete them within
do_install.
mesa: 8 installed and not shipped files. [installed-vs-shipped]
It might not be caused by this upgrade, but by addition of libvdpau, can
someone please look and fix it?
> ---
> meta/recipes-graphics/mesa/{mesa-gl_13.0.1.bb => mesa-gl_13.0.2.bb} | 0
> meta/recipes-graphics/mesa/{mesa_13.0.1.bb => mesa_13.0.2.bb} | 4 ++--
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-graphics/mesa/mesa-gl_13.0.1.bb b/meta/recipes-graphics/mesa/mesa-gl_13.0.2.bb
> similarity index 100%
> rename from meta/recipes-graphics/mesa/mesa-gl_13.0.1.bb
> rename to meta/recipes-graphics/mesa/mesa-gl_13.0.2.bb
> diff --git a/meta/recipes-graphics/mesa/mesa_13.0.1.bb b/meta/recipes-graphics/mesa/mesa_13.0.2.bb
> similarity index 83%
> rename from meta/recipes-graphics/mesa/mesa_13.0.1.bb
> rename to meta/recipes-graphics/mesa/mesa_13.0.2.bb
> index 37ac15f..bef1fa5 100644
> --- a/meta/recipes-graphics/mesa/mesa_13.0.1.bb
> +++ b/meta/recipes-graphics/mesa/mesa_13.0.2.bb
> @@ -6,8 +6,8 @@ SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/${PV}/mesa-${PV}.tar.xz \
> file://0001-Use-wayland-scanner-in-the-path.patch \
> "
>
> -SRC_URI[md5sum] = "72b7f4d0c2407f367484abd201cb8276"
> -SRC_URI[sha256sum] = "71962fb2bf77d33b0ad4a565b490dbbeaf4619099c6d9722f04a73187957a731"
> +SRC_URI[md5sum] = "9442c2dee914cde3d1f090371ab04113"
> +SRC_URI[sha256sum] = "a6ed622645f4ed61da418bf65adde5bcc4bb79023c36ba7d6b45b389da4416d5"
>
> #because we cannot rely on the fact that all apps will use pkgconfig,
> #make eglplatform.h independent of MESA_EGL_NO_X11_HEADER
>
> --
> To stop receiving notification emails like this one, please contact
> the administrator of this repository.
> --
> _______________________________________________
> Openembedded-commits mailing list
> Openembedded-commits@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-commits
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 201 bytes --]
^ permalink raw reply
* Re: [PATCH] Made spdx support SPDX2.0 SPEC Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
From: Sona Sarmadi @ 2016-12-22 9:07 UTC (permalink / raw)
To: Lei Maohui, openembedded-core@lists.openembedded.org
In-Reply-To: <1466986302-33565-2-git-send-email-leimaohui@cn.fujitsu.com>
Hi Lei, all,
> --- a/meta/classes/spdx.bbclass
> +++ b/meta/classes/spdx.bbclass
> @@ -1,12 +1,9 @@
> # This class integrates real-time license scanning, generation of SPDX
> standard # output and verifiying license info during the building process.
> -# It is a combination of efforts from the OE-Core, SPDX and Fossology
> projects.
> +# It is a combination of efforts from the OE-Core, SPDX and DoSOCSv2
> projects.
Why replace Fossology with DoSOCSv2? Why not make it optional?
Has anyone any comments on this suggestion? AFAI see this patch has not been accepted yet. Is there any plan to do it?
Cheers
//Sona
^ permalink raw reply
* Re: [PATCH 1/2] package_manager: default to have scriptlet output captured in log
From: Jussi Kukkonen @ 2016-12-22 9:36 UTC (permalink / raw)
To: Chen Qi; +Cc: Patches and discussions about the oe-core layer
In-Reply-To: <4e33a8311af3ea53162e3c9a8ed0848b4a8250cc.1482294710.git.Qi.Chen@windriver.com>
[-- Attachment #1: Type: text/plain, Size: 6348 bytes --]
On 21 December 2016 at 06:32, Chen Qi <Qi.Chen@windriver.com> wrote:
>
> We need to have scriptlet output captured in log. If we don't do so,
> some useful information from scriptlets (especially postinstall script)
> would be missing. In case a script has a warning message but it does not
> necessarily have to fail, the message should be captured.
>
> Opkg has already done that. Change for rpm and dpkg so that scriptlet
> output is captured and no warning message is missing.
>
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
> meta/lib/oe/package_manager.py | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/meta/lib/oe/package_manager.py
b/meta/lib/oe/package_manager.py
> index e557473..6892106 100644
> --- a/meta/lib/oe/package_manager.py
> +++ b/meta/lib/oe/package_manager.py
> @@ -669,11 +669,11 @@ class RpmPM(PackageManager):
> self.install_dir_path = os.path.join(self.target_rootfs,
self.install_dir_name)
> self.rpm_cmd = bb.utils.which(os.getenv('PATH'), "rpm")
> self.smart_cmd = bb.utils.which(os.getenv('PATH'), "smart")
> - # 0 = default, only warnings
> - # 1 = --log-level=info (includes information about executing
scriptlets and their output)
> + # 0 = --log-level=warning, only warnings
> + # 1 = --log-level=info (includes information about executing
scriptlets and their output), default
> # 2 = --log-level=debug
> # 3 = --log-level=debug plus dumps of scriplet content and
command invocation
> - self.debug_level = int(d.getVar('ROOTFS_RPM_DEBUG') or "0")
> + self.debug_level = int(d.getVar('ROOTFS_RPM_DEBUG') or "1")
> self.smart_opt = ["--log-level=%s" %
> ("warning" if self.debug_level == 0 else
> "info" if self.debug_level == 1 else
> @@ -2025,7 +2025,8 @@ class DpkgPM(OpkgDpkgPM):
> bb.note("Executing %s for package: %s ..." %
> (control_script.name.lower(), pkg_name))
> subprocess.check_output([p_full,
control_script.argument],
> - stderr=subprocess.STDOUT)
> + stderr=subprocess.STDOUT).decode("utf-8")
> + bb.note(output)
This patch seems likely to be the reason for this autobuilder failure:
https://autobuilder.yoctoproject.org/main/builders/nightly-deb-non-deb/builds/669/steps/BuildImages/logs/stdio
---
ERROR: core-image-sato-sdk-1.0-r0 do_rootfs: Error executing a python
function in exec_python_func() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:do_rootfs(d)
0003:
File:
'/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-deb-non-deb/build/meta/classes/image.bbclass',
lineno: 266, function: do_rootfs
0262:
0263: progress_reporter.next_stage()
0264:
0265: # generate rootfs
*** 0266: create_rootfs(d, progress_reporter=progress_reporter,
logcatcher=logcatcher)
0267:
0268: progress_reporter.finish()
0269:}
0270:do_rootfs[dirs] = "${TOPDIR}"
File:
'/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-deb-non-deb/build/meta/lib/oe/rootfs.py',
lineno: 1009, function: create_rootfs
1005: RpmRootfs(d, manifest_dir, progress_reporter,
logcatcher).create()
1006: elif img_type == "ipk":
1007: OpkgRootfs(d, manifest_dir, progress_reporter,
logcatcher).create()
1008: elif img_type == "deb":
*** 1009: DpkgRootfs(d, manifest_dir, progress_reporter,
logcatcher).create()
1010:
1011: os.environ.clear()
1012: os.environ.update(env_bkp)
1013:
File:
'/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-deb-non-deb/build/meta/lib/oe/rootfs.py',
lineno: 202, function: create
0198: if self.progress_reporter:
0199: self.progress_reporter.next_stage()
0200:
0201: # call the package manager dependent create method
*** 0202: self._create()
0203:
0204: sysconfdir = self.image_rootfs +
self.d.getVar('sysconfdir')
0205: bb.utils.mkdirhier(sysconfdir)
0206: with open(sysconfdir + "/version", "w+") as ver:
File:
'/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-deb-non-deb/build/meta/lib/oe/rootfs.py',
lineno: 691, function: _create
0687: self.pm.fix_broken_dependencies()
0688:
0689: self.pm.mark_packages("installed")
0690:
*** 0691: self.pm.run_pre_post_installs()
0692:
0693: execute_pre_post_process(self.d, deb_post_process_cmds)
0694:
0695: if self.progress_reporter:
File:
'/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-deb-non-deb/build/meta/lib/oe/package_manager.py',
lineno: 2029, function: run_pre_post_installs
2025: bb.note("Executing %s for package: %s
..." %
2026: (control_script.name.lower(),
pkg_name))
2027: subprocess.check_output([p_full,
control_script.argument],
2028:
stderr=subprocess.STDOUT).decode("utf-8")
*** 2029: bb.note(output)
2030: except subprocess.CalledProcessError as e:
2031: bb.note("%s for package %s failed with
%d:\n%s" %
2032: (control_script.name, pkg_name,
e.returncode,
2033: e.output.decode("utf-8")))
Exception: NameError: name 'output' is not defined
---
Thanks,
Jussi
>
> except subprocess.CalledProcessError as e:
> bb.note("%s for package %s failed with %d:\n%s" %
> (control_script.name, pkg_name,
e.returncode,
> --
> 1.9.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
[-- Attachment #2: Type: text/html, Size: 8101 bytes --]
^ permalink raw reply
* [PATCH v6] rootfs: Modify RPM installation
From: David Vincent @ 2016-12-22 10:23 UTC (permalink / raw)
To: openembedded-core, ross.burton, leonardo.sandoval.gonzalez,
daniela.plascencia
In-Reply-To: <20161220095122.11831-1-freesilicon@gmail.com>
When using a custom RPM data directory instead of the default dir
'/var/lib/rpm', the final image did not contain any of the database
files in the expected location. This commit takes into account the
'rpmlibdir' variable set into 'rootfs_rpm.bbclass'.
Changes since v4:
- Remove boolean in d.getVar() calls.
Changes since v5:
- Also modify rpm recipe to build the database in the correct
location and avoid errors during rootfs creation.
Signed-off-by: David Vincent <freesilicon@gmail.com>
---
meta/lib/oe/package_manager.py | 23 +++++++++++++----------
meta/lib/oe/rootfs.py | 3 ++-
meta/recipes-devtools/rpm/rpm_5.4.16.bb | 2 ++
3 files changed, 17 insertions(+), 11 deletions(-)
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index e557473999..3f2878c394 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -356,7 +356,8 @@ class RpmPkgsList(PkgsList):
super(RpmPkgsList, self).__init__(d, rootfs_dir)
self.rpm_cmd = bb.utils.which(os.getenv('PATH'), "rpm")
- self.image_rpmlib = os.path.join(self.rootfs_dir, 'var/lib/rpm')
+ self.rpm_libdir = self.d.getVar('rpmlibdir')
+ self.image_rpmlib = os.path.join(self.rootfs_dir, self.rpm_libdir[1:])
self.ml_prefix_list, self.ml_os_list = \
RpmIndexer(d, rootfs_dir).get_ml_prefix_and_os_list(arch_var, os_var)
@@ -416,7 +417,7 @@ class RpmPkgsList(PkgsList):
def list_pkgs(self):
cmd = [self.rpm_cmd, '--root', self.rootfs_dir]
- cmd.extend(['-D', '_dbpath /var/lib/rpm'])
+ cmd.extend(['-D', '_dbpath', self.rpm_libdir])
cmd.extend(['-qa', '--qf', '[%{NAME} %{ARCH} %{VERSION} %{PACKAGEORIGIN}\n]'])
try:
@@ -683,7 +684,8 @@ class RpmPM(PackageManager):
self.solution_manifest = self.d.expand('${T}/saved/%s_solution' %
self.task_name)
self.saved_rpmlib = self.d.expand('${T}/saved/%s' % self.task_name)
- self.image_rpmlib = os.path.join(self.target_rootfs, 'var/lib/rpm')
+ self.rpm_libdir = self.d.getVar('rpmlibdir')
+ self.image_rpmlib = os.path.join(self.target_rootfs, self.rpm_libdir[1:])
if not os.path.exists(self.d.expand('${T}/saved')):
bb.utils.mkdirhier(self.d.expand('${T}/saved'))
@@ -954,7 +956,7 @@ class RpmPM(PackageManager):
open(db_config_dir, 'w+').write(DB_CONFIG_CONTENT)
# Create database so that smart doesn't complain (lazy init)
- cmd = [self.rpm_cmd, '--root', self.target_rootfs, '--dbpath', '/var/lib/rpm', '-qa']
+ cmd = [self.rpm_cmd, '--root', self.target_rootfs, '--dbpath', self.rpm_libdir, '-qa']
try:
subprocess.check_output(cmd, stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as e:
@@ -963,20 +965,19 @@ class RpmPM(PackageManager):
# Import GPG key to RPM database of the target system
if self.d.getVar('RPM_SIGN_PACKAGES') == '1':
pubkey_path = self.d.getVar('RPM_GPG_PUBKEY')
- cmd = [self.rpm_cmd, '--root', self.target_rootfs, '--dbpath', '/var/lib/rpm', '--import', pubkey_path]
+ cmd = [self.rpm_cmd, '--root', self.target_rootfs, '--dbpath', self.rpm_libdir, '--import', pubkey_path]
try:
subprocess.check_output(cmd, stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as e:
bb.fatal("Import GPG key failed. Command '%s' "
"returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
-
# Configure smart
bb.note("configuring Smart settings")
bb.utils.remove(os.path.join(self.target_rootfs, 'var/lib/smart'),
True)
self._invoke_smart(['config', '--set', 'rpm-root=%s' % self.target_rootfs])
- self._invoke_smart(['config', '--set', 'rpm-dbpath=/var/lib/rpm'])
+ self._invoke_smart(['config', '--set', 'rpm-dbpath=%s' % self.rpm_libdir])
self._invoke_smart(['config', '--set', 'rpm-extra-macros._var=%s' %
self.d.getVar('localstatedir')])
cmd = ["config", "--set", "rpm-extra-macros._tmppath=/%s/tmp" % self.install_dir_name]
@@ -1236,7 +1237,7 @@ class RpmPM(PackageManager):
if not with_dependencies:
cmd = [self.rpm_cmd] + ["-e", "--nodeps", "--root=%s" %
- self.target_rootfs, "--dbpath=/var/lib/rpm",
+ self.target_rootfs, "--dbpath=%s" % self.rpm_libdir,
"--define='_cross_scriptlet_wrapper %s'" %
self.scriptlet_wrapper,
"--define='_tmppath /%s/tmp'" % self.install_dir_name] + pkgs
@@ -1384,7 +1385,8 @@ class RpmPM(PackageManager):
saved_dir = self.target_rootfs + self.d.expand('${sysconfdir}/rpm-postinsts/') + new_pkg
cmd = self.rpm_cmd + ' -q --scripts --root ' + self.target_rootfs
- cmd += ' --dbpath=/var/lib/rpm ' + new_pkg
+ cmd += ' --dbpath=%s ' % self.rpm_libdir
+ cmd += new_pkg
cmd += ' | sed -n -e "/^postinstall scriptlet (using .*):$/,/^.* scriptlet (using .*):$/ {/.*/p}"'
cmd += ' | sed -e "/postinstall scriptlet (using \(.*\)):$/d"'
cmd += ' -e "/^.* scriptlet (using .*):$/d" > %s' % saved_dir
@@ -1416,7 +1418,8 @@ class RpmPM(PackageManager):
'''
def unlock_rpm_db(self):
# Remove rpm db lock files
- rpm_db_locks = glob.glob('%s/var/lib/rpm/__db.*' % self.target_rootfs)
+ rpm_db_locks = glob.glob('%s%s/__db.*' % (self.target_rootfs,
+ self.rpm_libdir))
for f in rpm_db_locks:
bb.utils.remove(f, True)
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index d9a473006a..6eb05feb6c 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -429,6 +429,7 @@ class RpmRootfs(Rootfs):
def _create(self):
pkgs_to_install = self.manifest.parse_initial_manifest()
+ rpm_libdir = self.d.getVar('rpmlibdir')
rpm_pre_process_cmds = self.d.getVar('RPM_PREPROCESS_COMMANDS')
rpm_post_process_cmds = self.d.getVar('RPM_POSTPROCESS_COMMANDS')
@@ -476,7 +477,7 @@ class RpmRootfs(Rootfs):
if self.progress_reporter:
self.progress_reporter.next_stage()
- self._setup_dbg_rootfs(['/etc/rpm', '/var/lib/rpm', '/var/lib/smart'])
+ self._setup_dbg_rootfs(['/etc/rpm', rpm_libdir, '/var/lib/smart'])
execute_pre_post_process(self.d, rpm_post_process_cmds)
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.16.bb b/meta/recipes-devtools/rpm/rpm_5.4.16.bb
index 3df4d1ff1d..12181d89b1 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.16.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.16.bb
@@ -342,6 +342,7 @@ EXTRA_OECONF += "--verbose \
--enable-build-warnings \
--enable-build-debug \
--enable-maintainer-mode \
+ --with-path-database=${rpmlibdir} \
--with-path-macros=${rpm_macros} \
--with-path-lib=${libdir}/rpm \
--with-bugreport=http://bugzilla.yoctoproject.org \
@@ -384,6 +385,7 @@ FILES_${PN} = "${bindir}/rpm \
${localstatedir}/lib/wdj \
${bindir}/rpm.real \
${bindir}/rpmconstant.real \
+ ${rpmlibdir} \
"
FILES_${PN}-common = "${bindir}/rpm2cpio \
--
2.11.0
^ permalink raw reply related
* Re: [PATCH] gstreamer1.0-plugins-bad: Backport patches for improving live playback
From: Nicolas Dechesne @ 2016-12-22 10:25 UTC (permalink / raw)
To: Khem Raj; +Cc: Patches and discussions about the oe-core layer
In-Reply-To: <20161222081414.29642-1-raj.khem@gmail.com>
On Thu, Dec 22, 2016 at 9:14 AM, Khem Raj <raj.khem@gmail.com> wrote:
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
> ...1-mssdemux-improved-live-playback-support.patch | 929 +++++++++++++++++++++
> ...ming-implement-adaptivedemux-s-get_live_s.patch | 183 ++++
> ...ming-use-the-duration-from-the-list-of-fr.patch | 62 ++
> .../gstreamer/gstreamer1.0-plugins-bad_1.10.2.bb | 3 +
> 4 files changed, 1177 insertions(+)
> create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-mssdemux-improved-live-playback-support.patch
> create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-smoothstreaming-implement-adaptivedemux-s-get_live_s.patch
> create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-smoothstreaming-use-the-duration-from-the-list-of-fr.patch
>
Do we really want to do that? Backporting in stable branch looks right
to me, but backporting to master while we know that we will get gst
1.12 on time for the next release anyways, doesn't sound great to me.
maybe we should get these patches merged in 1.10.x instead of carrying
them ourselves?
^ permalink raw reply
* Re: [PATCH 2/3] gummiboot: Remove old gummiboot recipe, related class and wks file
From: Burton, Ross @ 2016-12-22 12:44 UTC (permalink / raw)
To: Alejandro Hernandez; +Cc: OE-core
In-Reply-To: <73f28b0aa183538fd3471df4e5d748488a5c30d2.1482339995.git.alejandro.hernandez@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 1360 bytes --]
On 21 December 2016 at 17:08, Alejandro Hernandez <
alejandro.hernandez@linux.intel.com> wrote:
> delete mode 100644 scripts/lib/wic/canned-wks/mkgummidisk.wks
>
I'm guessing this is why selftest fails:
FAIL: test_mkgummidisk (oeqa.selftest.wic.Wic)
Test creation of mkgummidisk image
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/utils/decorators.py",
line 109, in wrapped_f
return func(*args, **kwargs)
File
"/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/wic.py",
line 169, in test_mkgummidisk
self.assertEqual(0, runCmd(cmd).status)
File
"/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/utils/commands.py",
line 121, in runCmd
raise AssertionError("Command '%s' returned non-zero exit status
%d:\n%s" % (command, result.status, result.output))
AssertionError: Command 'wic create mkgummidisk --image-name
core-image-minimal' returned non-zero exit status 1:
Checking basic build environment...
Done.
No image named mkgummidisk found, exiting. (Use 'wic list images' to list
available images, or specify a fully-qualified OE kickstart (.wks) filename)
Ross
[-- Attachment #2: Type: text/html, Size: 2029 bytes --]
^ permalink raw reply
* Re: [PATCH 5/5] hdparm: 9.48 -> 9.50
From: Andre McCurdy @ 2016-12-22 12:55 UTC (permalink / raw)
To: Robert Yang; +Cc: OE Core mailing list
In-Reply-To: <6ed769b3-f938-1ce1-7f26-c51cb47a5d40@windriver.com>
On Wed, Dec 21, 2016 at 6:49 PM, Robert Yang <liezhi.yang@windriver.com> wrote:
> On 12/22/2016 10:47 AM, Robert Yang wrote:
>> On 12/21/2016 09:27 PM, Andre McCurdy wrote:
>>> On Tue, Dec 20, 2016 at 10:17 PM, Robert Yang <liezhi.yang@windriver.com>
>>> wrote:
>>>>
>>>> Add 0001-Makefile-use-weak-assignment-for-LDFALGS.patch to fix issues
>>>> like:
>>>> ERROR: hdparm-9.50-r0 do_package: QA Issue: File '/sbin/hdparm.hdparm'
>>>> from
>>>> hdparm was already stripped, this will prevent future debugging!
>>>> [already-stripped]
>>>> ERROR: hdparm-9.50-r0 do_package: Fatal QA errors found, failing task.
>>>
>>> Passing LDFLAGS on the make command line might be a cleaner solution
>>> than patching the Makefile.
>
> To be clear, passing LDFLAGS on the make command line doesn't work.
You need to remove "-e MAKEFLAGS= " from EXTRA_OEMAKE and add CC and
LDFLAGS (and anything required by the install target which isn't
passed on the command line already) but that's all worthy clean up
too.
^ permalink raw reply
* Re: [PATCH] elfutils 0.166->0.167
From: Burton, Ross @ 2016-12-22 12:59 UTC (permalink / raw)
To: Zheng Ruoqin; +Cc: OE-core
In-Reply-To: <1482373460-40914-1-git-send-email-zhengrq.fnst@cn.fujitsu.com>
[-- Attachment #1: Type: text/plain, Size: 1150 bytes --]
This patch is removed as you say it is merged upstream:
On 22 December 2016 at 02:24, Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
wrote:
> --- a/meta/recipes-devtools/elfutils/elfutils-0.166/0001-
> fix-a-stack-usage-warning.patch
> +++ /dev/null
> -diff --git a/backends/ppc_initreg.c b/backends/ppc_initreg.c
> -index 64f5379..52dde3e 100644
> ---- a/backends/ppc_initreg.c
> -+++ b/backends/ppc_initreg.c
> -@@ -93,7 +93,7 @@ ppc_set_initial_registers_tid (pid_t tid __attribute__
> ((unused)),
> - return false;
> - }
> - const size_t gprs = sizeof (user_regs.r.gpr) / sizeof
> (*user_regs.r.gpr);
> -- Dwarf_Word dwarf_regs[gprs];
> -+ Dwarf_Word dwarf_regs[sizeof (user_regs.r.gpr) / sizeof
> (*user_regs.r.gpr)];
>
However the upstream code
(https://git.fedorahosted.org/cgit/elfutils.git/tree/backends/ppc_initreg.c?h=elfutils-0.167#n95)
still says:
const size_t gprs = sizeof (user_regs.r.gpr) / sizeof (*user_regs.r.gpr);
Dwarf_Word dwarf_regs[gprs];
So this wasn't merged. Please re-review the patches (and maybe this is a
good opportunity to push more of them upstream).
Ross
[-- Attachment #2: Type: text/html, Size: 2318 bytes --]
^ permalink raw reply
* [PATCH 0/2] Set STAMPCLEAN for externalsrc when S == B
From: Ola x Nilsson @ 2016-12-22 13:16 UTC (permalink / raw)
To: openembedded-core; +Cc: Ola x Nilsson
When using devtool modify and changing code back and forth bitbake
sometimes does not realize that a rebuild is required. This is
because STAMP and STAMPCLEAN doesn't match. Old stamps confuse
bitbake and when the files in ${S} happen to match something we've
seen before bitbake decides to do nothing.
Fix by setting STAMPCLEAN.
Add tests.
Ola x Nilsson (2):
oe-selftest: devtool: Reverting a change should trigger rebuild
externalsrc: Set STAMPCLEAN to match STAMP
meta/classes/externalsrc.bbclass | 1 +
meta/lib/oeqa/selftest/devtool.py | 54 +++++++++++++++++++++++++++------------
2 files changed, 39 insertions(+), 16 deletions(-)
--
2.1.4
^ permalink raw reply
* [PATCH 1/2] oe-selftest: devtool: Reverting a change should trigger rebuild
From: Ola x Nilsson @ 2016-12-22 13:16 UTC (permalink / raw)
To: openembedded-core; +Cc: Ola x Nilsson
In-Reply-To: <1482412594-22508-1-git-send-email-ola.x.nilsson@axis.com>
Add code to verify that not only does a change trigger a build, but so
does reverting that change.
Reverting a change in a devtool managed git repo may cause the current
checksum to match the checksum of a previous build, which will cause
bitbake to skip builds that are needed.
---
meta/lib/oeqa/selftest/devtool.py | 54 +++++++++++++++++++++++++++------------
1 file changed, 38 insertions(+), 16 deletions(-)
diff --git a/meta/lib/oeqa/selftest/devtool.py b/meta/lib/oeqa/selftest/devtool.py
index 19c5ccf..a3beefa 100644
--- a/meta/lib/oeqa/selftest/devtool.py
+++ b/meta/lib/oeqa/selftest/devtool.py
@@ -437,17 +437,33 @@ class DevtoolTests(DevtoolBase):
# Check git repo
self._check_src_repo(tempdir)
# Try building
- bitbake('mdadm')
+ def list_stamps(globsuffix='*'):
+ stampprefix = get_bb_var('STAMP', 'mdadm')
+ self.assertTrue(stampprefix, 'Unable to get STAMP value for recipe mdadm')
+ return glob.glob(stampprefix + globsuffix)
+
+ numstamps = len(list_stamps('.do_compile.*'))
+ self.assertEqual(numstamps, 0, 'do_compile stamps before first build')
+ for x in range(10):
+ bitbake('mdadm')
+ nowstamps = len(list_stamps('.do_compile.*'))
+ if nowstamps == numstamps:
+ break
+ numstamps = nowstamps
+ else:
+ self.fail('build did not stabilize in 10 iterations')
+
# Try making (minor) modifications to the source
modfile = os.path.join(tempdir, 'mdadm.8.in')
result = runCmd("sed -i 's!^\.TH.*!.TH MDADM 8 \"\" v9.999-custom!' %s" % modfile)
- sedline = ''
- with open(modfile, 'r') as f:
- for line in f:
- if line.startswith('.TH'):
- sedline = line.rstrip()
- break
- self.assertEqual(sedline, '.TH MDADM 8 "" v9.999-custom', 'man .in file not modified (sed failed)')
+
+ def check_TH_line(checkfile, expected, message):
+ with open(checkfile, 'r') as f:
+ for line in f:
+ if line.startswith('.TH'):
+ self.assertEqual(line.rstrip(), expected, message)
+
+ check_TH_line(modfile, '.TH MDADM 8 "" v9.999-custom', 'man .in file not modified (sed failed)')
bitbake('mdadm -c package')
pkgd = get_bb_var('PKGD', 'mdadm')
self.assertTrue(pkgd, 'Could not query PKGD variable')
@@ -456,18 +472,24 @@ class DevtoolTests(DevtoolBase):
if mandir[0] == '/':
mandir = mandir[1:]
manfile = os.path.join(pkgd, mandir, 'man8', 'mdadm.8')
- with open(manfile, 'r') as f:
- for line in f:
- if line.startswith('.TH'):
- self.assertEqual(line.rstrip(), '.TH MDADM 8 "" v9.999-custom', 'man file not modified. man searched file path: %s' % manfile)
+ check_TH_line(manfile, '.TH MDADM 8 "" v9.999-custom', 'man file not modified. man searched file path: %s' % manfile)
+ # Test reverting the change
+ result = runCmd("git -C %s checkout -- %s" % (tempdir, modfile))
+ check_TH_line(modfile, '.TH MDADM 8 "" v3.4', 'man .in file not restored (git failed)')
+ bitbake('mdadm -c package')
+ pkgd = get_bb_var('PKGD', 'mdadm')
+ self.assertTrue(pkgd, 'Could not query PKGD variable')
+ mandir = get_bb_var('mandir', 'mdadm')
+ self.assertTrue(mandir, 'Could not query mandir variable')
+ if mandir[0] == '/':
+ mandir = mandir[1:]
+ manfile = os.path.join(pkgd, mandir, 'man8', 'mdadm.8')
+ check_TH_line(manfile, '.TH MDADM 8 "" v3.4', 'man file not updated. man searched file path: %s' % manfile)
# Test devtool reset
- stampprefix = get_bb_var('STAMP', 'mdadm')
result = runCmd('devtool reset mdadm')
result = runCmd('devtool status')
self.assertNotIn('mdadm', result.output)
- self.assertTrue(stampprefix, 'Unable to get STAMP value for recipe mdadm')
- matches = glob.glob(stampprefix + '*')
- self.assertFalse(matches, 'Stamp files exist for recipe mdadm that should have been cleaned')
+ self.assertFalse(list_stamps(), 'Stamp files exist for recipe mdadm that should have been cleaned')
@testcase(1166)
def test_devtool_modify_invalid(self):
--
2.1.4
^ permalink raw reply related
* [PATCH 2/2] externalsrc: Set STAMPCLEAN to match STAMP
From: Ola x Nilsson @ 2016-12-22 13:16 UTC (permalink / raw)
To: openembedded-core; +Cc: Ola x Nilsson
In-Reply-To: <1482412594-22508-1-git-send-email-ola.x.nilsson@axis.com>
Only the last stamp file should be kept, but unless STAMPCLEAN matches
files generated using STAMP old stamp files may linger. This may
cause false positives for skipping tasks.
---
meta/classes/externalsrc.bbclass | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass
index e115a47..eec5e61 100644
--- a/meta/classes/externalsrc.bbclass
+++ b/meta/classes/externalsrc.bbclass
@@ -116,6 +116,7 @@ python () {
configstamp = '${TMPDIR}/work-shared/${PN}/${EXTENDPE}${PV}-${PR}/configure.sstate'
d.setVar('CONFIGURESTAMPFILE', configstamp)
d.setVar('STAMP', '${STAMPS_DIR}/work-shared/${PN}/${EXTENDPE}${PV}-${PR}')
+ d.setVar('STAMPCLEAN', '${STAMPS_DIR}/work-shared/${PN}/*-*')
}
python externalsrc_configure_prefunc() {
--
2.1.4
^ permalink raw reply related
* [PATCH] externalsrc.bbclass: Add task buildclean
From: Ola x Nilsson @ 2016-12-22 13:28 UTC (permalink / raw)
To: openembedded-core
The buildclean task should call the package build system clean
command, just implemented for Make for now.
This is meant for recipes where S == B, but can be useful as a
standalone task for other recipes too.
Setting it to run before do_clean will do what most developers expect
when calling bitbake -c clean.
Signed-off-by: Ola x Nilsson <ola.x.nilsson@axis.com>
---
meta/classes/externalsrc.bbclass | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass
index e115a47..bc82f1f 100644
--- a/meta/classes/externalsrc.bbclass
+++ b/meta/classes/externalsrc.bbclass
@@ -4,7 +4,7 @@
# Copyright (C) 2009 Chris Larson <clarson@kergoth.com>
# Released under the MIT license (see COPYING.MIT for the terms)
#
-# externalsrc.bbclass enables use of an existing source tree, usually external to
+# externalsrc.bbclass enables use of an existing source tree, usually external to
# the build system to build a piece of software rather than the usual fetch/unpack/patch
# process.
#
@@ -108,6 +108,8 @@ python () {
# We don't want the workdir to go away
d.appendVar('RM_WORK_EXCLUDE', ' ' + d.getVar('PN'))
+ bb.build.addtask('do_makeclean', 'do_clean', None, d)
+
# If B=S the same builddir is used even for different architectures.
# Thus, use a shared CONFIGURESTAMPFILE and STAMP directory so that
# change of do_configure task hash is correctly detected and stamps are
@@ -142,6 +144,17 @@ python externalsrc_compile_prefunc() {
bb.plain('NOTE: %s: compiling from external source tree %s' % (d.getVar('PN'), d.getVar('EXTERNALSRC')))
}
+do_buildclean[dirs] = "${S} ${B}"
+do_buildclean[nostamp] = "1"
+do_buildclean[doc] = "Call 'make clean' or equivalent in ${B}"
+externalsrc_do_buildclean() {
+ if [ -e Makefile -o -e makefile -o -e GNUmakefile ]; then
+ oe_runmake clean || die "make failed"
+ else
+ bbnote "nothing to compile - no makefile found"
+ fi
+}
+
def srctree_hash_files(d):
import shutil
import subprocess
@@ -188,3 +201,5 @@ def srctree_configure_hash_files(d):
if f in search_files:
out_items.append('%s:True' % os.path.join(root, f))
return ' '.join(out_items)
+
+EXPORT_FUNCTIONS do_buildclean
--
2.1.4
^ permalink raw reply related
* Re: [PATCH 5/5] hdparm: 9.48 -> 9.50
From: Andreas Oberritter @ 2016-12-22 13:34 UTC (permalink / raw)
To: Robert Yang, Andre McCurdy; +Cc: OE Core mailing list
In-Reply-To: <ea7ce818-05fa-a41d-c70e-b94260328d09@windriver.com>
On 22.12.2016 04:14, Robert Yang wrote:
> On 12/22/2016 11:09 AM, Andreas Oberritter wrote:
>> On 22.12.2016 03:47, Robert Yang wrote:
>>> On 12/21/2016 09:27 PM, Andre McCurdy wrote:
>>>> Passing LDFLAGS on the make command line might be a cleaner solution
>>>> than patching the Makefile.
>>>
>>> We can't do that since there is a "-e MAKEFLAGS=" in EXTRA_OEMAKE,
>>> and its
>>> Makefile is:
>>>
>>> all:
>>> make -j2 hdparm
>>>
>>> hdparm: hdparm.h sgio.h $(OBJS)
>>> $(CC) $(LDFLAGS) -o hdparm $(OBJS)
>>> $(STRIP) hdparm
>>>
>>> The "make -j2 hdparm" doesn't pass any env vars to sub make since
>>> MAKEFLAGS=,
>>> so that need use weak assignment "?=" here.
>>
>> You don't need to use target 'all'. Try this:
>>
>> do_compile() {
>> oe_runmake hdparm
>> }
>
> I know this will work, but "make hdparm" rather than "all" may cause other
> issues in the future when hdparm gets ugpraded, for example, "all" doesn't
> only contain "hdmarm". And do we have really have to add a do_compile()
> here ?
It's certainly easier to delete do_compile in a future version's recipe
than regenerating patches. hdparm is looking for a new maintainer, btw.
'hdparm' has been the only target built by 'all' since at least version
3.1, which dates back to 1996.
Regards,
Andreas
^ permalink raw reply
* Re: [PATCH 02/33] dpkg: update-alternatives-dpkg should conflict with other providers
From: Andreas Oberritter @ 2016-12-22 13:37 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core
In-Reply-To: <fd84e0c1-d8ae-371b-0ef8-05f73b31a64e@opendreambox.org>
On 08.12.2016 20:22, Andreas Oberritter wrote:
> On 08.12.2016 17:16, Burton, Ross wrote:
>> With PACKAGE_CLASSES="package_rpm package_deb" this happens:
>>
>> ERROR: dpkg-native-1.18.7-r0 do_populate_sysroot: The recipe dpkg-native
>> is trying to install files into a shared area when those files already
>> exist. Those files and their manifest location are:
>>
>> /data/poky-master/tmp-glibc/sysroots/x86_64-linux/usr/bin/update-alternatives
>> Matched in b'manifest-x86_64-opkg-utils-native.populate_sysroot'
>>
>> Whilst I agree that building multiple package types at the same time is
>> a bit weird, it's always worked in the past.
>
> Yes, I used this feature myself some time ago and don't want to be the
> one breaking it. ;-)
>
> Does this happen with the branch I pushed yesterday? Since commit
> 472899be2a97bf6c5741f6b414433e13cfea1c7b it shouldn't happen unless you
> either explicitly enable update-alternatives in dpkg's PACKAGECONFIG, or
> set PREFERRED_PROVIDER_virtual/update-alternatives-native to dpkg-native.
Ross, did look into this?
Regards,
Andreas
^ permalink raw reply
* [PATCH] externalsrc: Add optional srcdir arg to srctree_hash_files
From: Ola x Nilsson @ 2016-12-22 13:59 UTC (permalink / raw)
To: openembedded-core
Make it easier to reuse the function for other dirs than EXTERNALSRC.
Signed-off-by: Ola x Nilsson <ola.x.nilsson@axis.com>
---
meta/classes/externalsrc.bbclass | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass
index e115a47..3e38399 100644
--- a/meta/classes/externalsrc.bbclass
+++ b/meta/classes/externalsrc.bbclass
@@ -142,12 +142,12 @@ python externalsrc_compile_prefunc() {
bb.plain('NOTE: %s: compiling from external source tree %s' % (d.getVar('PN'), d.getVar('EXTERNALSRC')))
}
-def srctree_hash_files(d):
+def srctree_hash_files(d, srcdir=None):
import shutil
import subprocess
import tempfile
- s_dir = d.getVar('EXTERNALSRC')
+ s_dir = srcdir or d.getVar('EXTERNALSRC')
git_dir = os.path.join(s_dir, '.git')
oe_hash_file = os.path.join(git_dir, 'oe-devtool-tree-sha1')
@@ -165,7 +165,7 @@ def srctree_hash_files(d):
fobj.write(sha1)
ret = oe_hash_file + ':True'
else:
- ret = d.getVar('EXTERNALSRC') + '/*:True'
+ ret = s_dir + '/*:True'
return ret
def srctree_configure_hash_files(d):
--
2.1.4
^ permalink raw reply related
* Re: [PATCH v6] rootfs: Modify RPM installation
From: Burton, Ross @ 2016-12-22 14:09 UTC (permalink / raw)
To: David Vincent; +Cc: Plascencia, Daniela, OE-core
In-Reply-To: <20161222102320.15247-1-freesilicon@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 8568 bytes --]
Small problem: we always build rpm-native as we need it for some tools, but
rpmlibdir is only defined in package_rpm.bbclass which doesn't have to be
inherited.
This leads to just --with-path-database= being passed to configure. What's
the behaviour of RPM when this happens? What does it default to? If it's
going to be safe (ie a sane default is used), please update the commit
message to explain this.
Ross
On 22 December 2016 at 10:23, David Vincent <freesilicon@gmail.com> wrote:
> When using a custom RPM data directory instead of the default dir
> '/var/lib/rpm', the final image did not contain any of the database
> files in the expected location. This commit takes into account the
> 'rpmlibdir' variable set into 'rootfs_rpm.bbclass'.
>
> Changes since v4:
> - Remove boolean in d.getVar() calls.
>
> Changes since v5:
> - Also modify rpm recipe to build the database in the correct
> location and avoid errors during rootfs creation.
>
> Signed-off-by: David Vincent <freesilicon@gmail.com>
> ---
> meta/lib/oe/package_manager.py | 23 +++++++++++++----------
> meta/lib/oe/rootfs.py | 3 ++-
> meta/recipes-devtools/rpm/rpm_5.4.16.bb | 2 ++
> 3 files changed, 17 insertions(+), 11 deletions(-)
>
> diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.
> py
> index e557473999..3f2878c394 100644
> --- a/meta/lib/oe/package_manager.py
> +++ b/meta/lib/oe/package_manager.py
> @@ -356,7 +356,8 @@ class RpmPkgsList(PkgsList):
> super(RpmPkgsList, self).__init__(d, rootfs_dir)
>
> self.rpm_cmd = bb.utils.which(os.getenv('PATH'), "rpm")
> - self.image_rpmlib = os.path.join(self.rootfs_dir, 'var/lib/rpm')
> + self.rpm_libdir = self.d.getVar('rpmlibdir')
> + self.image_rpmlib = os.path.join(self.rootfs_dir,
> self.rpm_libdir[1:])
>
> self.ml_prefix_list, self.ml_os_list = \
> RpmIndexer(d, rootfs_dir).get_ml_prefix_and_os_list(arch_var,
> os_var)
> @@ -416,7 +417,7 @@ class RpmPkgsList(PkgsList):
>
> def list_pkgs(self):
> cmd = [self.rpm_cmd, '--root', self.rootfs_dir]
> - cmd.extend(['-D', '_dbpath /var/lib/rpm'])
> + cmd.extend(['-D', '_dbpath', self.rpm_libdir])
> cmd.extend(['-qa', '--qf', '[%{NAME} %{ARCH} %{VERSION}
> %{PACKAGEORIGIN}\n]'])
>
> try:
> @@ -683,7 +684,8 @@ class RpmPM(PackageManager):
> self.solution_manifest = self.d.expand('${T}/saved/%s_solution' %
> self.task_name)
> self.saved_rpmlib = self.d.expand('${T}/saved/%s' %
> self.task_name)
> - self.image_rpmlib = os.path.join(self.target_rootfs,
> 'var/lib/rpm')
> + self.rpm_libdir = self.d.getVar('rpmlibdir')
> + self.image_rpmlib = os.path.join(self.target_rootfs,
> self.rpm_libdir[1:])
>
> if not os.path.exists(self.d.expand('${T}/saved')):
> bb.utils.mkdirhier(self.d.expand('${T}/saved'))
> @@ -954,7 +956,7 @@ class RpmPM(PackageManager):
> open(db_config_dir, 'w+').write(DB_CONFIG_CONTENT)
>
> # Create database so that smart doesn't complain (lazy init)
> - cmd = [self.rpm_cmd, '--root', self.target_rootfs, '--dbpath',
> '/var/lib/rpm', '-qa']
> + cmd = [self.rpm_cmd, '--root', self.target_rootfs, '--dbpath',
> self.rpm_libdir, '-qa']
> try:
> subprocess.check_output(cmd, stderr=subprocess.STDOUT)
> except subprocess.CalledProcessError as e:
> @@ -963,20 +965,19 @@ class RpmPM(PackageManager):
> # Import GPG key to RPM database of the target system
> if self.d.getVar('RPM_SIGN_PACKAGES') == '1':
> pubkey_path = self.d.getVar('RPM_GPG_PUBKEY')
> - cmd = [self.rpm_cmd, '--root', self.target_rootfs,
> '--dbpath', '/var/lib/rpm', '--import', pubkey_path]
> + cmd = [self.rpm_cmd, '--root', self.target_rootfs,
> '--dbpath', self.rpm_libdir, '--import', pubkey_path]
> try:
> subprocess.check_output(cmd, stderr=subprocess.STDOUT)
> except subprocess.CalledProcessError as e:
> bb.fatal("Import GPG key failed. Command '%s' "
> "returned %d:\n%s" % (' '.join(cmd),
> e.returncode, e.output.decode("utf-8")))
>
> -
> # Configure smart
> bb.note("configuring Smart settings")
> bb.utils.remove(os.path.join(self.target_rootfs,
> 'var/lib/smart'),
> True)
> self._invoke_smart(['config', '--set', 'rpm-root=%s' %
> self.target_rootfs])
> - self._invoke_smart(['config', '--set', 'rpm-dbpath=/var/lib/rpm'])
> + self._invoke_smart(['config', '--set', 'rpm-dbpath=%s' %
> self.rpm_libdir])
> self._invoke_smart(['config', '--set', 'rpm-extra-macros._var=%s'
> %
> self.d.getVar('localstatedir')])
> cmd = ["config", "--set", "rpm-extra-macros._tmppath=/%s/tmp" %
> self.install_dir_name]
> @@ -1236,7 +1237,7 @@ class RpmPM(PackageManager):
>
> if not with_dependencies:
> cmd = [self.rpm_cmd] + ["-e", "--nodeps", "--root=%s" %
> - self.target_rootfs, "--dbpath=/var/lib/rpm",
> + self.target_rootfs, "--dbpath=%s" % self.rpm_libdir,
> "--define='_cross_scriptlet_wrapper %s'" %
> self.scriptlet_wrapper,
> "--define='_tmppath /%s/tmp'" %
> self.install_dir_name] + pkgs
> @@ -1384,7 +1385,8 @@ class RpmPM(PackageManager):
> saved_dir = self.target_rootfs + self.d.expand('${sysconfdir}/rpm-postinsts/')
> + new_pkg
>
> cmd = self.rpm_cmd + ' -q --scripts --root ' + self.target_rootfs
> - cmd += ' --dbpath=/var/lib/rpm ' + new_pkg
> + cmd += ' --dbpath=%s ' % self.rpm_libdir
> + cmd += new_pkg
> cmd += ' | sed -n -e "/^postinstall scriptlet (using .*):$/,/^.*
> scriptlet (using .*):$/ {/.*/p}"'
> cmd += ' | sed -e "/postinstall scriptlet (using \(.*\)):$/d"'
> cmd += ' -e "/^.* scriptlet (using .*):$/d" > %s' % saved_dir
> @@ -1416,7 +1418,8 @@ class RpmPM(PackageManager):
> '''
> def unlock_rpm_db(self):
> # Remove rpm db lock files
> - rpm_db_locks = glob.glob('%s/var/lib/rpm/__db.*' %
> self.target_rootfs)
> + rpm_db_locks = glob.glob('%s%s/__db.*' % (self.target_rootfs,
> + self.rpm_libdir))
> for f in rpm_db_locks:
> bb.utils.remove(f, True)
>
> diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
> index d9a473006a..6eb05feb6c 100644
> --- a/meta/lib/oe/rootfs.py
> +++ b/meta/lib/oe/rootfs.py
> @@ -429,6 +429,7 @@ class RpmRootfs(Rootfs):
>
> def _create(self):
> pkgs_to_install = self.manifest.parse_initial_manifest()
> + rpm_libdir = self.d.getVar('rpmlibdir')
> rpm_pre_process_cmds = self.d.getVar('RPM_PREPROCESS_COMMANDS')
> rpm_post_process_cmds = self.d.getVar('RPM_POSTPROCESS_COMMANDS')
>
> @@ -476,7 +477,7 @@ class RpmRootfs(Rootfs):
> if self.progress_reporter:
> self.progress_reporter.next_stage()
>
> - self._setup_dbg_rootfs(['/etc/rpm', '/var/lib/rpm',
> '/var/lib/smart'])
> + self._setup_dbg_rootfs(['/etc/rpm', rpm_libdir,
> '/var/lib/smart'])
>
> execute_pre_post_process(self.d, rpm_post_process_cmds)
>
> diff --git a/meta/recipes-devtools/rpm/rpm_5.4.16.bb
> b/meta/recipes-devtools/rpm/rpm_5.4.16.bb
> index 3df4d1ff1d..12181d89b1 100644
> --- a/meta/recipes-devtools/rpm/rpm_5.4.16.bb
> +++ b/meta/recipes-devtools/rpm/rpm_5.4.16.bb
> @@ -342,6 +342,7 @@ EXTRA_OECONF += "--verbose \
> --enable-build-warnings \
> --enable-build-debug \
> --enable-maintainer-mode \
> + --with-path-database=${rpmlibdir} \
> --with-path-macros=${rpm_macros} \
> --with-path-lib=${libdir}/rpm \
> --with-bugreport=http://bugzilla.yoctoproject.org \
> @@ -384,6 +385,7 @@ FILES_${PN} = "${bindir}/rpm \
> ${localstatedir}/lib/wdj \
> ${bindir}/rpm.real \
> ${bindir}/rpmconstant.real \
> + ${rpmlibdir} \
> "
>
> FILES_${PN}-common = "${bindir}/rpm2cpio \
> --
> 2.11.0
>
>
[-- Attachment #2: Type: text/html, Size: 11378 bytes --]
^ permalink raw reply
* Re: [PATCH] gpgme: add GPGME_STATUS_KEY_CONSIDERED
From: Alexander Kanavin @ 2016-12-22 14:30 UTC (permalink / raw)
To: Yu, Mingli, openembedded-core
In-Reply-To: <585B397B.6080206@windriver.com>
On 12/22/2016 04:24 AM, Yu, Mingli wrote:
> Thanks Alex!
> Actually I ever tried to upgrade gpgme to 1.8.0 before send out this
> patch, but there comes other ptest failed issues for python-pygpgme
> which not exist on current gpgme 1.6.0 if we simply update gpgme to 1.8.0.
>
> Anyway I prefer to wait for more update for python-pygpgme from
> https://pagure.io/pygpgme/commits/master before we move forward to gpgme
> 1.8.0.
pygpgme upstream hasn't released a new version since 2012; the link
above is someone's fork to fix the pressing issues, and there's no
indication they will do more fixing. I suggest you just take the
necessary patches, add them to pygpgme recipe, and update gpgme recipe
at the same time. You can also review debian/ubuntu's pygpgme packages
to see what custom patching they have there.
Alex
^ permalink raw reply
* Re: [PATCH v6] rootfs: Modify RPM installation
From: David Vincent @ 2016-12-22 14:45 UTC (permalink / raw)
To: Burton, Ross; +Cc: Plascencia, Daniela, OE-core
In-Reply-To: <CAJTo0LY5hHkOfQuzSO-W6TjDFPXY5N=J0x5DKoCT1Rn2ZU+4TA@mail.gmail.com>
On jeudi 22 décembre 2016 14:09:32 CET Burton, Ross wrote:
> Small problem: we always build rpm-native as we need it for some tools, but
> rpmlibdir is only defined in package_rpm.bbclass which doesn't have to be
> inherited.
I didn't know that rpm-native was built in any case, rpm being selected as
package manager or not.
> This leads to just --with-path-database= being passed to configure. What's
> the behaviour of RPM when this happens? What does it default to? If it's
> going to be safe (ie a sane default is used), please update the commit
> message to explain this.
Indeed, this can lead to undefined behavior. I can propose some solutions but
which one would you find better :
- Setting a weak assignment for rpmlibdir inside rpm recipe
- Setting a default assignment for rpmlibdir_class-native inside rpm recipe
- Another option I didn't think of
> Ross
>
David
^ permalink raw reply
* [PATCH 0/2] kernel-yocto: 4.9 goodness
From: Bruce Ashfield @ 2016-12-22 14:49 UTC (permalink / raw)
To: richard.purdie; +Cc: openembedded-core
Hi all,
I'm sending this out so it can get some extra test cycles. I've built and
booted core-image-kernel-dev/sato on qemu* with the 4.9 kernel and 4.9
libc-headers.
I didn't see any issues .. but there always seems to be one lurking.
I'm heading out of town for the holidays, so this commit does not switch
qemu* to use 4.9 by default, but it does put the recipes and trees in
place for upcoming work on new targets and -rt support.
So assuming that the libc-headers change survives some autobuilder cycles,
this should be safe for merge.
Cheers,
Bruce
The following changes since commit d0d260b0b85790ceb136dd6b0445e8e33d038f5e:
u-boot/beaglebone: Select Beaglebone Black target specifically. (2016-12-17 09:57:37 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib zedd/kernel
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=zedd/kernel
Bruce Ashfield (2):
linux-libc-headers: introduce 4.9 headers
kernel: introduce linux-yocto v4.9 recipes
meta/conf/distro/include/tcmode-default.inc | 2 +-
...bc-headers_4.8.bb => linux-libc-headers_4.9.bb} | 6 +--
meta/recipes-kernel/linux/linux-yocto-rt_4.9.bb | 38 +++++++++++++++++++
meta/recipes-kernel/linux/linux-yocto-tiny_4.9.bb | 25 ++++++++++++
meta/recipes-kernel/linux/linux-yocto_4.9.bb | 44 ++++++++++++++++++++++
5 files changed, 110 insertions(+), 5 deletions(-)
rename meta/recipes-kernel/linux-libc-headers/{linux-libc-headers_4.8.bb => linux-libc-headers_4.9.bb} (64%)
create mode 100644 meta/recipes-kernel/linux/linux-yocto-rt_4.9.bb
create mode 100644 meta/recipes-kernel/linux/linux-yocto-tiny_4.9.bb
create mode 100644 meta/recipes-kernel/linux/linux-yocto_4.9.bb
--
2.5.0
^ permalink raw reply
* [PATCH 1/2] linux-libc-headers: introduce 4.9 headers
From: Bruce Ashfield @ 2016-12-22 14:49 UTC (permalink / raw)
To: richard.purdie; +Cc: openembedded-core
In-Reply-To: <cover.1482415485.git.bruce.ashfield@windriver.com>
Bumping the linux-libc-headers to the 4.9 kernel variant. Since 4.9
will be a LTSI kernel, and there will be an associated linux-yocto
it is worth moving to these headers sooner rather than later.
This commit also drops the 4.8 headers and sets 4.9 to be the default.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
meta/conf/distro/include/tcmode-default.inc | 2 +-
| 6 ++----
2 files changed, 3 insertions(+), 5 deletions(-)
rename meta/recipes-kernel/linux-libc-headers/{linux-libc-headers_4.8.bb => linux-libc-headers_4.9.bb} (64%)
diff --git a/meta/conf/distro/include/tcmode-default.inc b/meta/conf/distro/include/tcmode-default.inc
index ca3c5ec90a5f..836adaf9dddb 100644
--- a/meta/conf/distro/include/tcmode-default.inc
+++ b/meta/conf/distro/include/tcmode-default.inc
@@ -28,7 +28,7 @@ BINUVERSION ?= "2.27%"
GDBVERSION ?= "7.11%"
GLIBCVERSION ?= "2.24"
UCLIBCVERSION ?= "1.0%"
-LINUXLIBCVERSION ?= "4.8%"
+LINUXLIBCVERSION ?= "4.9%"
PREFERRED_VERSION_gcc ?= "${GCCVERSION}"
PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "${GCCVERSION}"
--git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.8.bb b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.9.bb
similarity index 64%
rename from meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.8.bb
rename to meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.9.bb
index 77e0870d326f..0a44018f880b 100644
--- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.8.bb
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.9.bb
@@ -1,12 +1,10 @@
require linux-libc-headers.inc
-PV = "4.8"
-
SRC_URI_append_libc-musl = "\
file://0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch \
file://0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch \
file://0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch \
"
-SRC_URI[md5sum] = "c1af0afbd3df35c1ccdc7a5118cd2d07"
-SRC_URI[sha256sum] = "3e9150065f193d3d94bcf46a1fe9f033c7ef7122ab71d75a7fb5a2f0c9a7e11a"
+SRC_URI[md5sum] = "0a68ef3615c64bd5ee54a3320e46667d"
+SRC_URI[sha256sum] = "029098dcffab74875e086ae970e3828456838da6e0ba22ce3f64ef764f3d7f1a"
--
2.5.0
^ permalink raw reply related
* [PATCH 2/2] kernel: introduce linux-yocto v4.9 recipes
From: Bruce Ashfield @ 2016-12-22 14:49 UTC (permalink / raw)
To: richard.purdie; +Cc: openembedded-core
In-Reply-To: <cover.1482415485.git.bruce.ashfield@windriver.com>
Introducing the 4.9 kernel recipes. 4.9 will be a LTSI kernel, so we
introduce these recipes with the intent that they'll replace 4.1 as
the LTSI kernel, and other older kernels (i.e 4.4/4.8) once 4.9
shown to be stable.
linux-yocto-tiny and linux-yocto-rt are also part of this commit, but
are placeholders while we wait for their content to be available. They
will build, but provide nothing above the standard kernel at the
moment.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
meta/recipes-kernel/linux/linux-yocto-rt_4.9.bb | 38 ++++++++++++++++++++
meta/recipes-kernel/linux/linux-yocto-tiny_4.9.bb | 25 +++++++++++++
meta/recipes-kernel/linux/linux-yocto_4.9.bb | 44 +++++++++++++++++++++++
3 files changed, 107 insertions(+)
create mode 100644 meta/recipes-kernel/linux/linux-yocto-rt_4.9.bb
create mode 100644 meta/recipes-kernel/linux/linux-yocto-tiny_4.9.bb
create mode 100644 meta/recipes-kernel/linux/linux-yocto_4.9.bb
diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_4.9.bb b/meta/recipes-kernel/linux/linux-yocto-rt_4.9.bb
new file mode 100644
index 000000000000..2f1c6523147c
--- /dev/null
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_4.9.bb
@@ -0,0 +1,38 @@
+KBRANCH ?= "standard/preempt-rt/base"
+
+require recipes-kernel/linux/linux-yocto.inc
+
+# Skip processing of this recipe if it is not explicitly specified as the
+# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying
+# to build multiple virtual/kernel providers, e.g. as dependency of
+# core-image-rt-sdk, core-image-rt.
+python () {
+ if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt":
+ raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
+}
+
+SRCREV_machine ?= "617635e43afee1aaf98a8f8300596f7a112513c0"
+SRCREV_meta ?= "c56f2da94e4773ea25eebfd14200164ef21730a3"
+
+SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.9.git;branch=${KBRANCH};name=machine \
+ git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.9;destsuffix=${KMETA}"
+
+LINUX_VERSION ?= "4.9"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+KMETA = "kernel-meta"
+KCONF_BSP_AUDIT_LEVEL = "2"
+
+LINUX_KERNEL_TYPE = "preempt-rt"
+
+COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm|qemuppc|qemumips)"
+
+KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
+
+# Functionality flags
+KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
+KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
+KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
+KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc"
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_4.9.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_4.9.bb
new file mode 100644
index 000000000000..62df631f3539
--- /dev/null
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_4.9.bb
@@ -0,0 +1,25 @@
+KBRANCH ?= "standard/tiny/common-pc"
+LINUX_KERNEL_TYPE = "tiny"
+KCONFIG_MODE = "--allnoconfig"
+
+require recipes-kernel/linux/linux-yocto.inc
+
+LINUX_VERSION ?= "4.9"
+
+KMETA = "kernel-meta"
+KCONF_BSP_AUDIT_LEVEL = "2"
+
+SRCREV_machine ?= "617635e43afee1aaf98a8f8300596f7a112513c0"
+SRCREV_meta ?= "c56f2da94e4773ea25eebfd14200164ef21730a3"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.9.git;branch=${KBRANCH};name=machine \
+ git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.9;destsuffix=${KMETA}"
+
+COMPATIBLE_MACHINE = "(qemux86$)"
+
+# Functionality flags
+KERNEL_FEATURES = ""
+
+KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
diff --git a/meta/recipes-kernel/linux/linux-yocto_4.9.bb b/meta/recipes-kernel/linux/linux-yocto_4.9.bb
new file mode 100644
index 000000000000..d84400a323eb
--- /dev/null
+++ b/meta/recipes-kernel/linux/linux-yocto_4.9.bb
@@ -0,0 +1,44 @@
+KBRANCH ?= "standard/base"
+
+require recipes-kernel/linux/linux-yocto.inc
+
+# board specific branches
+KBRANCH_qemuarm ?= "standard/arm-versatile-926ejs"
+KBRANCH_qemuarm64 ?= "standard/qemuarm64"
+KBRANCH_qemumips ?= "standard/mti-malta32"
+KBRANCH_qemuppc ?= "standard/qemuppc"
+KBRANCH_qemux86 ?= "standard/base"
+KBRANCH_qemux86-64 ?= "standard/base"
+KBRANCH_qemumips64 ?= "standard/mti-malta64"
+
+SRCREV_machine_qemuarm ?= "0fda844a4c8da3d987b8173128c2b14948133b2e"
+SRCREV_machine_qemuarm64 ?= "617635e43afee1aaf98a8f8300596f7a112513c0"
+SRCREV_machine_qemumips ?= "22f2f6de114cf1fc58e068d1aff220d633aeaddf"
+SRCREV_machine_qemuppc ?= "617635e43afee1aaf98a8f8300596f7a112513c0"
+SRCREV_machine_qemux86 ?= "617635e43afee1aaf98a8f8300596f7a112513c0"
+SRCREV_machine_qemux86-64 ?= "617635e43afee1aaf98a8f8300596f7a112513c0"
+SRCREV_machine_qemumips64 ?= "3183d61d4d00d8b7faf10d11b3da8cf3db432e6f"
+SRCREV_machine ?= "617635e43afee1aaf98a8f8300596f7a112513c0"
+SRCREV_meta ?= "c56f2da94e4773ea25eebfd14200164ef21730a3"
+
+SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.9.git;name=machine;branch=${KBRANCH}; \
+ git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.9;destsuffix=${KMETA}"
+
+LINUX_VERSION ?= "4.9"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+KMETA = "kernel-meta"
+KCONF_BSP_AUDIT_LEVEL = "2"
+
+KERNEL_DEVICETREE_qemuarm = "versatile-pb.dtb"
+
+COMPATIBLE_MACHINE = "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64"
+
+# Functionality flags
+KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
+KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
+KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
+KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"
--
2.5.0
^ permalink raw reply related
* Re: [oe-commits] [openembedded-core] 02/20: openssl: Security fix CVE-2016-2177
From: Martin Jansa @ 2016-12-22 15:21 UTC (permalink / raw)
To: openembedded-core, Armin Kuster; +Cc: openembedded-commits
In-Reply-To: <20160923222225.E2A2A50174@opal.openembedded.org>
[-- Attachment #1: Type: text/plain, Size: 12784 bytes --]
On Fri, Sep 23, 2016 at 10:22:26PM +0000, git@git.openembedded.org wrote:
> rpurdie pushed a commit to branch jethro
> in repository openembedded-core.
This change and CVE-2016-8610.patch seems to be missing in krogoth branch.
OE @ ~/openembedded-core $ git diff origin/jethro origin/krogoth -- meta/recipes-connectivity/openssl/openssl_1.0.2h.bb | grep CVE
- file://CVE-2016-2177.patch \
- file://CVE-2016-2178.patch \
+ file://CVE-2016-2178.patch \
+ file://CVE-2016-2179.patch \
file://CVE-2016-2180.patch \
file://CVE-2016-2181_p1.patch \
file://CVE-2016-2181_p2.patch \
file://CVE-2016-6303.patch \
file://CVE-2016-6304.patch \
file://CVE-2016-6306.patch \
- file://CVE-2016-2179.patch \
- file://CVE-2016-8610.patch \
Is there some pending pull request for krogoth? There is also that tzdata version lower in krogoth than jethro I've reported a while ago:
OE @ ~/openembedded-core $ git diff origin/jethro origin/krogoth -- meta/recipes-extended/tzdata/
diff --git a/meta/recipes-extended/tzdata/tzdata_2016i.bb b/meta/recipes-extended/tzdata/tzdata_2016g.bb
similarity index 94%
rename from meta/recipes-extended/tzdata/tzdata_2016i.bb
rename to meta/recipes-extended/tzdata/tzdata_2016g.bb
> commit 5781eb9a6e6bf8984b090a488d2a326bf9fafcf8
> Author: Armin Kuster <akuster@mvista.com>
> AuthorDate: Sat Jul 16 16:04:11 2016 -0700
>
> openssl: Security fix CVE-2016-2177
>
> Affects openssl <= 1.0.2h
> CVSS v2 Base Score: 7.5 HIGH
>
> Signed-off-by: Armin Kuster <akuster@mvista.com>
> Signed-off-by: Ross Burton <ross.burton@intel.com>
> (cherry picked from commit 2848c7d3e454cbc84cba9183f23ccdf3e9200ec9)
> Signed-off-by: Armin Kuster <akuster808@gmail.com>
> ---
> .../openssl/openssl/CVE-2016-2177.patch | 286 +++++++++++++++++++++
> .../recipes-connectivity/openssl/openssl_1.0.2h.bb | 1 +
> 2 files changed, 287 insertions(+)
>
> diff --git a/meta/recipes-connectivity/openssl/openssl/CVE-2016-2177.patch b/meta/recipes-connectivity/openssl/openssl/CVE-2016-2177.patch
> new file mode 100644
> index 0000000..df36d5f
> --- /dev/null
> +++ b/meta/recipes-connectivity/openssl/openssl/CVE-2016-2177.patch
> @@ -0,0 +1,286 @@
> +From a004e72b95835136d3f1ea90517f706c24c03da7 Mon Sep 17 00:00:00 2001
> +From: Matt Caswell <matt@openssl.org>
> +Date: Thu, 5 May 2016 11:10:26 +0100
> +Subject: [PATCH] Avoid some undefined pointer arithmetic
> +
> +A common idiom in the codebase is:
> +
> +if (p + len > limit)
> +{
> + return; /* Too long */
> +}
> +
> +Where "p" points to some malloc'd data of SIZE bytes and
> +limit == p + SIZE
> +
> +"len" here could be from some externally supplied data (e.g. from a TLS
> +message).
> +
> +The rules of C pointer arithmetic are such that "p + len" is only well
> +defined where len <= SIZE. Therefore the above idiom is actually
> +undefined behaviour.
> +
> +For example this could cause problems if some malloc implementation
> +provides an address for "p" such that "p + len" actually overflows for
> +values of len that are too big and therefore p + len < limit!
> +
> +Issue reported by Guido Vranken.
> +
> +CVE-2016-2177
> +
> +Reviewed-by: Rich Salz <rsalz@openssl.org>
> +
> +Upstream-Status: Backport
> +CVE: CVE-2016-2177
> +
> +Signed-off-by: Armin Kuster <akuster@mvista.com>
> +
> +
> +---
> + ssl/s3_srvr.c | 14 +++++++-------
> + ssl/ssl_sess.c | 2 +-
> + ssl/t1_lib.c | 56 ++++++++++++++++++++++++++++++--------------------------
> + 3 files changed, 38 insertions(+), 34 deletions(-)
> +
> +diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c
> +index ab28702..ab7f690 100644
> +--- a/ssl/s3_srvr.c
> ++++ b/ssl/s3_srvr.c
> +@@ -980,7 +980,7 @@ int ssl3_get_client_hello(SSL *s)
> +
> + session_length = *(p + SSL3_RANDOM_SIZE);
> +
> +- if (p + SSL3_RANDOM_SIZE + session_length + 1 >= d + n) {
> ++ if (SSL3_RANDOM_SIZE + session_length + 1 >= (d + n) - p) {
> + al = SSL_AD_DECODE_ERROR;
> + SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, SSL_R_LENGTH_TOO_SHORT);
> + goto f_err;
> +@@ -998,7 +998,7 @@ int ssl3_get_client_hello(SSL *s)
> + /* get the session-id */
> + j = *(p++);
> +
> +- if (p + j > d + n) {
> ++ if ((d + n) - p < j) {
> + al = SSL_AD_DECODE_ERROR;
> + SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, SSL_R_LENGTH_TOO_SHORT);
> + goto f_err;
> +@@ -1054,14 +1054,14 @@ int ssl3_get_client_hello(SSL *s)
> +
> + if (SSL_IS_DTLS(s)) {
> + /* cookie stuff */
> +- if (p + 1 > d + n) {
> ++ if ((d + n) - p < 1) {
> + al = SSL_AD_DECODE_ERROR;
> + SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, SSL_R_LENGTH_TOO_SHORT);
> + goto f_err;
> + }
> + cookie_len = *(p++);
> +
> +- if (p + cookie_len > d + n) {
> ++ if ((d + n ) - p < cookie_len) {
> + al = SSL_AD_DECODE_ERROR;
> + SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, SSL_R_LENGTH_TOO_SHORT);
> + goto f_err;
> +@@ -1131,7 +1131,7 @@ int ssl3_get_client_hello(SSL *s)
> + }
> + }
> +
> +- if (p + 2 > d + n) {
> ++ if ((d + n ) - p < 2) {
> + al = SSL_AD_DECODE_ERROR;
> + SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, SSL_R_LENGTH_TOO_SHORT);
> + goto f_err;
> +@@ -1145,7 +1145,7 @@ int ssl3_get_client_hello(SSL *s)
> + }
> +
> + /* i bytes of cipher data + 1 byte for compression length later */
> +- if ((p + i + 1) > (d + n)) {
> ++ if ((d + n) - p < i + 1) {
> + /* not enough data */
> + al = SSL_AD_DECODE_ERROR;
> + SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, SSL_R_LENGTH_MISMATCH);
> +@@ -1211,7 +1211,7 @@ int ssl3_get_client_hello(SSL *s)
> +
> + /* compression */
> + i = *(p++);
> +- if ((p + i) > (d + n)) {
> ++ if ((d + n) - p < i) {
> + /* not enough data */
> + al = SSL_AD_DECODE_ERROR;
> + SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO, SSL_R_LENGTH_MISMATCH);
> +diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c
> +index b182998..54ee783 100644
> +--- a/ssl/ssl_sess.c
> ++++ b/ssl/ssl_sess.c
> +@@ -573,7 +573,7 @@ int ssl_get_prev_session(SSL *s, unsigned char *session_id, int len,
> + int r;
> + #endif
> +
> +- if (session_id + len > limit) {
> ++ if (limit - session_id < len) {
> + fatal = 1;
> + goto err;
> + }
> +diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c
> +index fb64607..cdac011 100644
> +--- a/ssl/t1_lib.c
> ++++ b/ssl/t1_lib.c
> +@@ -1867,11 +1867,11 @@ static void ssl_check_for_safari(SSL *s, const unsigned char *data,
> + 0x02, 0x03, /* SHA-1/ECDSA */
> + };
> +
> +- if (data >= (limit - 2))
> ++ if (limit - data <= 2)
> + return;
> + data += 2;
> +
> +- if (data > (limit - 4))
> ++ if (limit - data < 4)
> + return;
> + n2s(data, type);
> + n2s(data, size);
> +@@ -1879,7 +1879,7 @@ static void ssl_check_for_safari(SSL *s, const unsigned char *data,
> + if (type != TLSEXT_TYPE_server_name)
> + return;
> +
> +- if (data + size > limit)
> ++ if (limit - data < size)
> + return;
> + data += size;
> +
> +@@ -1887,7 +1887,7 @@ static void ssl_check_for_safari(SSL *s, const unsigned char *data,
> + const size_t len1 = sizeof(kSafariExtensionsBlock);
> + const size_t len2 = sizeof(kSafariTLS12ExtensionsBlock);
> +
> +- if (data + len1 + len2 != limit)
> ++ if (limit - data != (int)(len1 + len2))
> + return;
> + if (memcmp(data, kSafariExtensionsBlock, len1) != 0)
> + return;
> +@@ -1896,7 +1896,7 @@ static void ssl_check_for_safari(SSL *s, const unsigned char *data,
> + } else {
> + const size_t len = sizeof(kSafariExtensionsBlock);
> +
> +- if (data + len != limit)
> ++ if (limit - data != (int)(len))
> + return;
> + if (memcmp(data, kSafariExtensionsBlock, len) != 0)
> + return;
> +@@ -2053,19 +2053,19 @@ static int ssl_scan_clienthello_tlsext(SSL *s, unsigned char **p,
> + if (data == limit)
> + goto ri_check;
> +
> +- if (data > (limit - 2))
> ++ if (limit - data < 2)
> + goto err;
> +
> + n2s(data, len);
> +
> +- if (data + len != limit)
> ++ if (limit - data != len)
> + goto err;
> +
> +- while (data <= (limit - 4)) {
> ++ while (limit - data >= 4) {
> + n2s(data, type);
> + n2s(data, size);
> +
> +- if (data + size > (limit))
> ++ if (limit - data < size)
> + goto err;
> + # if 0
> + fprintf(stderr, "Received extension type %d size %d\n", type, size);
> +@@ -2472,18 +2472,18 @@ static int ssl_scan_clienthello_custom_tlsext(SSL *s,
> + if (s->hit || s->cert->srv_ext.meths_count == 0)
> + return 1;
> +
> +- if (data >= limit - 2)
> ++ if (limit - data <= 2)
> + return 1;
> + n2s(data, len);
> +
> +- if (data > limit - len)
> ++ if (limit - data < len)
> + return 1;
> +
> +- while (data <= limit - 4) {
> ++ while (limit - data >= 4) {
> + n2s(data, type);
> + n2s(data, size);
> +
> +- if (data + size > limit)
> ++ if (limit - data < size)
> + return 1;
> + if (custom_ext_parse(s, 1 /* server */ , type, data, size, al) <= 0)
> + return 0;
> +@@ -2569,20 +2569,20 @@ static int ssl_scan_serverhello_tlsext(SSL *s, unsigned char **p,
> + SSL_TLSEXT_HB_DONT_SEND_REQUESTS);
> + # endif
> +
> +- if (data >= (d + n - 2))
> ++ if ((d + n) - data <= 2)
> + goto ri_check;
> +
> + n2s(data, length);
> +- if (data + length != d + n) {
> ++ if ((d + n) - data != length) {
> + *al = SSL_AD_DECODE_ERROR;
> + return 0;
> + }
> +
> +- while (data <= (d + n - 4)) {
> ++ while ((d + n) - data >= 4) {
> + n2s(data, type);
> + n2s(data, size);
> +
> +- if (data + size > (d + n))
> ++ if ((d + n) - data < size)
> + goto ri_check;
> +
> + if (s->tlsext_debug_cb)
> +@@ -3307,29 +3307,33 @@ int tls1_process_ticket(SSL *s, unsigned char *session_id, int len,
> + /* Skip past DTLS cookie */
> + if (SSL_IS_DTLS(s)) {
> + i = *(p++);
> +- p += i;
> +- if (p >= limit)
> ++
> ++ if (limit - p <= i)
> + return -1;
> ++
> ++ p += i;
> + }
> + /* Skip past cipher list */
> + n2s(p, i);
> +- p += i;
> +- if (p >= limit)
> ++ if (limit - p <= i)
> + return -1;
> ++ p += i;
> ++
> + /* Skip past compression algorithm list */
> + i = *(p++);
> +- p += i;
> +- if (p > limit)
> ++ if (limit - p < i)
> + return -1;
> ++ p += i;
> ++
> + /* Now at start of extensions */
> +- if ((p + 2) >= limit)
> ++ if (limit - p <= 2)
> + return 0;
> + n2s(p, i);
> +- while ((p + 4) <= limit) {
> ++ while (limit - p >= 4) {
> + unsigned short type, size;
> + n2s(p, type);
> + n2s(p, size);
> +- if (p + size > limit)
> ++ if (limit - p < size)
> + return 0;
> + if (type == TLSEXT_TYPE_session_ticket) {
> + int r;
> +--
> +2.3.5
> +
> diff --git a/meta/recipes-connectivity/openssl/openssl_1.0.2h.bb b/meta/recipes-connectivity/openssl/openssl_1.0.2h.bb
> index ea40275..4135a31 100644
> --- a/meta/recipes-connectivity/openssl/openssl_1.0.2h.bb
> +++ b/meta/recipes-connectivity/openssl/openssl_1.0.2h.bb
> @@ -38,6 +38,7 @@ SRC_URI += "file://configure-targets.patch \
> file://openssl-1.0.2a-x32-asm.patch \
> file://ptest_makefile_deps.patch \
> file://parallel.patch \
> + file://CVE-2016-2177.patch \
> "
>
> SRC_URI[md5sum] = "9392e65072ce4b614c1392eefc1f23d0"
>
> --
> To stop receiving notification emails like this one, please contact
> the administrator of this repository.
> --
> _______________________________________________
> Openembedded-commits mailing list
> Openembedded-commits@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-commits
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 201 bytes --]
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox