Openembedded Core Discussions
 help / color / mirror / Atom feed
* Re: [PATCH] devtool: execute associated functions while preparing the source tree
From: Paul Eggleton @ 2016-11-30  3:14 UTC (permalink / raw)
  To: Jiajie Hu; +Cc: openembedded-core
In-Reply-To: <9313919.Y4CtTjI68L@peggleto-mobl.ger.corp.intel.com>

On Wed, 30 Nov 2016 14:39:12 Paul Eggleton wrote:
> On Wed, 30 Nov 2016 09:33:22 Jiajie Hu wrote:
> > On Wednesday, November 30, 2016 07:01:30 AM Paul Eggleton wrote:
> > > So this in itself looks reasonable in theory, but I have to warn you
> > > that when we switch to tinfoil2 [1] these commits are going to be done
> > > via the metadata instead, and beyond a possible hack that I'd really
> > > rather not think about it's going to be a bit difficult to intercept the
> > > prefuncs/postfuncs there. At least they will be executed though since
> > > with tinfoil2 we'll be going through a much more standard path to run
> > > the tasks.
> > > 
> > > [1] https://wiki.yoctoproject.org/wiki/Tinfoil2
> > 
> > Glad to know that my fix can be superseded by tinfoil2 APIs. Do you have
> > any estimation when the switch will happen?
> 
> The target is 2.3 milestone 1, which is in December. However there are still
> a lot of things to be fixed as I've noted on the wiki page I linked.
> 
> Thinking about it though it's possible I could split out this particular
> change and get it sent earlier - in fact that may be a good idea anyway.
> I'll look into that.

Actually, I spoke too soon. Whilst moving the creation of commits out to the 
metadata can be done separately (and is already implemented in a separate 
patch), it won't actually help on its own because it doesn't change how the 
tasks are executed. The bit we need is executing the tasks as they would be 
executed normally, and unfortunately that's not possible without the full 
tinfoil2 changeset.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


^ permalink raw reply

* Re: [PATCH 0/2] fix can't login when debug-tweaks is not in IMAGE_FEATURES
From: Robert Yang @ 2016-11-30  3:15 UTC (permalink / raw)
  To: openembedded-core, Paul Eggleton, Burton, Ross, Khem Raj,
	Mike Looijmans, Patrick Ohly
In-Reply-To: <cover.1479871728.git.liezhi.yang@windriver.com>

Hello,

According to the discussions, here are things that we may do,
please feel free to give your comments.
1) Add an image feature like "production", which will conflict with
    debug-tweaks, and check for some common security issues ?

2) Add a way like ROOT_PASSWD to let user can set root passwd easily ?

3) Do nothing, leave it as the current status.

// Robert

On 11/23/2016 03:49 PM, Robert Yang wrote:
> Fixed 2 bugs:
> - Can't login as root when debug-tweaks/empty-root-password is not in
>   IMAGE_FEATURES since no passwd.
> - When set root passwd and debug-tweaks/empty-root-password is in
>   IMAGE_FEATURES, passwd is *required* to login.
>
> Filed https://bugzilla.yoctoproject.org/show_bug.cgi?id=10710, and
> marked doc changes required as yes.
>
> // Robert
>
> The following changes since commit a675b2c89e477af088faee9b3be96eae19a85f0b:
>
>   sanity.bbclass: fix logging of an error (2016-11-15 15:18:50 +0000)
>
> are available in the git repository at:
>
>   git://git.openembedded.org/openembedded-core-contrib rbt/root
>   http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/root
>
> Robert Yang (2):
>   rootfs-postcommands.bbclass: fix zap_empty_root_password
>   base-passwd: set root's default password to 'root'
>
>  meta/classes/rootfs-postcommands.bbclass                 |  8 ++++----
>  .../base-passwd/base-passwd/passwd_master.patch          | 16 ++++++++++++++++
>  meta/recipes-core/base-passwd/base-passwd_3.5.29.bb      |  1 +
>  3 files changed, 21 insertions(+), 4 deletions(-)
>  create mode 100644 meta/recipes-core/base-passwd/base-passwd/passwd_master.patch
>


^ permalink raw reply

* [PATCH] strace: 4.13 -> 4.14
From: huangqy @ 2016-11-30 12:02 UTC (permalink / raw)
  To: openembedded-core

From: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>

Upgrade strace from 4.13 to 4.14.

Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>
---
 meta/recipes-devtools/strace/{strace_4.13.bb => strace_4.14.bb} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-devtools/strace/{strace_4.13.bb => strace_4.14.bb} (91%)

diff --git a/meta/recipes-devtools/strace/strace_4.13.bb b/meta/recipes-devtools/strace/strace_4.14.bb
similarity index 91%
rename from meta/recipes-devtools/strace/strace_4.13.bb
rename to meta/recipes-devtools/strace/strace_4.14.bb
index cae7f21..452925c 100644
--- a/meta/recipes-devtools/strace/strace_4.13.bb
+++ b/meta/recipes-devtools/strace/strace_4.14.bb
@@ -15,8 +15,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.xz \
            file://mips-SIGEMT.patch \
            "
 
-SRC_URI[md5sum] = "4b78c7febdd24c79d5147824d1a080a3"
-SRC_URI[sha256sum] = "d48f732576c91ece36a5843d63f9be054c40ef59f1e4773986042636861625d7"
+SRC_URI[md5sum] = "1e39b5f7583256d7dc21170b9da529ae"
+SRC_URI[sha256sum] = "5bed5110b243dce6864bedba269446c18c8c63f553cdd7fd4f808d89a764712f"
 
 inherit autotools ptest bluetooth
 
-- 
2.7.4





^ permalink raw reply related

* [PATCH V5] subprocess cleanup
From: Stephano Cetola @ 2016-11-30  4:45 UTC (permalink / raw)
  To: openembedded-core

changed since V4:
Removed single quotes from the --show-format option on smart query.
The quote was causing the arch search to fail in the following for
loop.

Stephano Cetola (1):
  package_manager: remove strings and migrate to direct arrays

 meta/lib/oe/package.py         |  13 +--
 meta/lib/oe/package_manager.py | 229 ++++++++++++++++++++---------------------
 2 files changed, 118 insertions(+), 124 deletions(-)

-- 
2.10.2



^ permalink raw reply

* [PATCH V5] package_manager: remove strings and migrate to direct arrays
From: Stephano Cetola @ 2016-11-30  4:45 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <20161130044533.128338-1-stephano.cetola@linux.intel.com>

When using subprocess call and check_output, it is better to use arrays
rather than strings when possible to avoid whitespace and quoting
problems.

[ YOCTO #9342 ]

Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com>
---
 meta/lib/oe/package.py         |  13 +--
 meta/lib/oe/package_manager.py | 229 ++++++++++++++++++++---------------------
 2 files changed, 118 insertions(+), 124 deletions(-)

diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
index 02642f2..ae60a58 100644
--- a/meta/lib/oe/package.py
+++ b/meta/lib/oe/package.py
@@ -18,23 +18,24 @@ def runstrip(arg):
         newmode = origmode | stat.S_IWRITE | stat.S_IREAD
         os.chmod(file, newmode)
 
-    extraflags = ""
+    stripcmd = [strip]
 
     # kernel module    
     if elftype & 16:
-        extraflags = "--strip-debug --remove-section=.comment --remove-section=.note --preserve-dates"
+        stripcmd.extend(["--strip-debug", "--remove-section=.comment",
+            "--remove-section=.note", "--preserve-dates"])
     # .so and shared library
     elif ".so" in file and elftype & 8:
-        extraflags = "--remove-section=.comment --remove-section=.note --strip-unneeded"
+        stripcmd.extend(["--remove-section=.comment", "--remove-section=.note", "--strip-unneeded"])
     # shared or executable:
     elif elftype & 8 or elftype & 4:
-        extraflags = "--remove-section=.comment --remove-section=.note"
+        stripcmd.extend(["--remove-section=.comment", "--remove-section=.note"])
 
-    stripcmd = "'%s' %s '%s'" % (strip, extraflags, file)
+    stripcmd.append(file)
     bb.debug(1, "runstrip: %s" % stripcmd)
 
     try:
-        output = subprocess.check_output(stripcmd, stderr=subprocess.STDOUT, shell=True)
+        output = subprocess.check_output(stripcmd, stderr=subprocess.STDOUT)
     except subprocess.CalledProcessError as e:
         bb.error("runstrip: '%s' strip command failed with %s (%s)" % (stripcmd, e.returncode, e.output))
 
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 7ba2e4d..d4a5185 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -358,12 +358,11 @@ class RpmPkgsList(PkgsList):
             RpmIndexer(d, rootfs_dir).get_ml_prefix_and_os_list(arch_var, os_var)
 
         # Determine rpm version
-        cmd = "%s --version" % self.rpm_cmd
         try:
-            output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).decode("utf-8")
+            output = subprocess.check_output([self.rpm_cmd, "--version"], stderr=subprocess.STDOUT).decode("utf-8")
         except subprocess.CalledProcessError as e:
             bb.fatal("Getting rpm version failed. Command '%s' "
-                     "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
+                     "returned %d:\n%s" % (self.rpm_cmd, e.returncode, e.output.decode("utf-8")))
 
     '''
     Translate the RPM/Smart format names to the OE multilib format names
@@ -412,16 +411,15 @@ class RpmPkgsList(PkgsList):
         return output
 
     def list_pkgs(self):
-        cmd = self.rpm_cmd + ' --root ' + self.rootfs_dir
-        cmd += ' -D "_dbpath /var/lib/rpm" -qa'
-        cmd += " --qf '[%{NAME} %{ARCH} %{VERSION} %{PACKAGEORIGIN}\n]'"
+        cmd = [self.rpm_cmd, '--root', self.rootfs_dir]
+        cmd.extend(['-D', '_dbpath /var/lib/rpm'])
+        cmd.extend(['-qa', '--qf', '[%{NAME} %{ARCH} %{VERSION} %{PACKAGEORIGIN}\n]'])
 
         try:
-            # bb.note(cmd)
-            tmp_output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).strip().decode("utf-8")
+            tmp_output = subprocess.check_output(cmd, stderr=subprocess.STDOUT).strip().decode("utf-8")
         except subprocess.CalledProcessError as e:
             bb.fatal("Cannot get the installed packages list. Command '%s' "
-                     "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
+                     "returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
 
         output = dict()
         deps = dict()
@@ -672,11 +670,11 @@ class RpmPM(PackageManager):
         # 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', True) or "0")
-        self.smart_opt = "--log-level=%s --data-dir=%s" % \
+        self.smart_opt = ["--log-level=%s" %
                          ("warning" if self.debug_level == 0 else
                           "info" if self.debug_level == 1 else
-                          "debug",
-                          os.path.join(target_rootfs, 'var/lib/smart'))
+                          "debug"), "--data-dir=%s" %
+                          os.path.join(target_rootfs, 'var/lib/smart')]
         self.scriptlet_wrapper = self.d.expand('${WORKDIR}/scriptlet_wrapper')
         self.solution_manifest = self.d.expand('${T}/saved/%s_solution' %
                                                self.task_name)
@@ -732,18 +730,18 @@ class RpmPM(PackageManager):
                 for arch in arch_list:
                     bb.note('Adding Smart channel url%d%s (%s)' %
                             (uri_iterator, arch, channel_priority))
-                    self._invoke_smart('channel --add url%d-%s type=rpm-md baseurl=%s/%s -y'
-                                       % (uri_iterator, arch, uri, arch))
-                    self._invoke_smart('channel --set url%d-%s priority=%d' %
-                                       (uri_iterator, arch, channel_priority))
+                    self._invoke_smart(['channel', '--add', 'url%d-%s' % (uri_iterator, arch),
+                        'type=rpm-md', 'baseurl=%s/%s' % (uri, arch), '-y'])
+                    self._invoke_smart(['channel', '--set', 'url%d-%s' % (uri_iterator, arch),
+                        'priority=%d' % channel_priority])
                     channel_priority -= 5
             else:
                 bb.note('Adding Smart channel url%d (%s)' %
                         (uri_iterator, channel_priority))
-                self._invoke_smart('channel --add url%d type=rpm-md baseurl=%s -y'
-                                   % (uri_iterator, uri))
-                self._invoke_smart('channel --set url%d priority=%d' %
-                                   (uri_iterator, channel_priority))
+                self._invoke_smart(['channel', '--add', 'url%d' % uri_iterator,
+                    'type=rpm-md', 'baseurl=%s' % uri, '-y'])
+                self._invoke_smart(['channel', '--set', 'url%d' % uri_iterator, 
+                    'priority=%d' % channel_priority])
                 channel_priority -= 5
 
             uri_iterator += 1
@@ -774,18 +772,17 @@ class RpmPM(PackageManager):
 
         self._create_configs(platform, platform_extra)
 
+    #takes array args
     def _invoke_smart(self, args):
-        cmd = "%s %s %s" % (self.smart_cmd, self.smart_opt, args)
+        cmd = [self.smart_cmd] + self.smart_opt + args
         # bb.note(cmd)
         try:
-            complementary_pkgs = subprocess.check_output(cmd,
-                                                         stderr=subprocess.STDOUT,
-                                                         shell=True).decode("utf-8")
+            complementary_pkgs = subprocess.check_output(cmd,stderr=subprocess.STDOUT).decode("utf-8")
             # bb.note(complementary_pkgs)
             return complementary_pkgs
         except subprocess.CalledProcessError as e:
             bb.fatal("Could not invoke smart. Command "
-                     "'%s' returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
+                     "'%s' returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
 
     def _search_pkg_name_in_feeds(self, pkg, feed_archs):
         for arch in feed_archs:
@@ -800,19 +797,23 @@ class RpmPM(PackageManager):
 
         # Search provides if not found by pkgname.
         bb.note('Not found %s by name, searching provides ...' % pkg)
-        cmd = "%s %s query --provides %s --show-format='$name-$version'" % \
-                (self.smart_cmd, self.smart_opt, pkg)
-        cmd += " | sed -ne 's/ *Provides://p'"
-        bb.note('cmd: %s' % cmd)
-        output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).decode("utf-8")
-        # Found a provider
-        if output:
-            bb.note('Found providers for %s: %s' % (pkg, output))
-            for p in output.split():
-                for arch in feed_archs:
-                    arch = arch.replace('-', '_')
-                    if p.rstrip().endswith('@' + arch):
-                        return p
+        cmd = [self.smart_cmd] + self.smart_opt + ["query", "--provides", pkg,
+                "--show-format=$name-$version"]
+        bb.note('cmd: %s' % ' '.join(cmd))
+        ps = subprocess.Popen(cmd, stdout=subprocess.PIPE)
+        try:
+            output = subprocess.check_output(["sed", "-ne", "s/ *Provides://p"],
+                stdin=ps.stdout, stderr=subprocess.STDOUT).decode("utf-8")
+            # Found a provider
+            if output:
+                bb.note('Found providers for %s: %s' % (pkg, output))
+                for p in output.split():
+                    for arch in feed_archs:
+                        arch = arch.replace('-', '_')
+                        if p.rstrip().endswith('@' + arch):
+                            return p
+        except subprocess.CalledProcessError as e:
+            bb.error("Failed running smart query on package %s." % pkg)
 
         return ""
 
@@ -949,30 +950,32 @@ class RpmPM(PackageManager):
             open(db_config_dir, 'w+').write(DB_CONFIG_CONTENT)
 
         # Create database so that smart doesn't complain (lazy init)
-        opt = "-qa"
-        cmd = "%s --root %s --dbpath /var/lib/rpm %s > /dev/null" % (
-              self.rpm_cmd, self.target_rootfs, opt)
+        cmd = [self.rpm_cmd, '--root', self.target_rootfs, '--dbpath', '/var/lib/rpm', '-qa']
         try:
-            subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
+            subprocess.check_output(cmd, stderr=subprocess.STDOUT)
         except subprocess.CalledProcessError as e:
             bb.fatal("Create rpm database failed. Command '%s' "
-                     "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
+                     "returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
         # Import GPG key to RPM database of the target system
         if self.d.getVar('RPM_SIGN_PACKAGES', True) == '1':
             pubkey_path = self.d.getVar('RPM_GPG_PUBKEY', True)
-            cmd = "%s --root %s --dbpath /var/lib/rpm --import %s > /dev/null" % (
-                  self.rpm_cmd, self.target_rootfs, pubkey_path)
-            subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
+            cmd = [self.rpm_cmd, '--root', self.target_rootfs, '--dbpath', '/var/lib/rpm', '--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-extra-macros._var=%s' %
-                           self.d.getVar('localstatedir', True))
-        cmd = "config --set rpm-extra-macros._tmppath=/%s/tmp" % (self.install_dir_name)
+        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-extra-macros._var=%s' %
+                           self.d.getVar('localstatedir', True)])
+        cmd = ["config", "--set", "rpm-extra-macros._tmppath=/%s/tmp" % self.install_dir_name]
 
         prefer_color = self.d.getVar('RPM_PREFER_ELF_ARCH', True)
         if prefer_color:
@@ -986,32 +989,32 @@ class RpmPM(PackageManager):
                                     ['mips64', 'mips64el']:
                 bb.fatal("RPM_PREFER_ELF_ARCH = \"4\" is for mips64 or mips64el "
                          "only.")
-            self._invoke_smart('config --set rpm-extra-macros._prefer_color=%s'
-                        % prefer_color)
+            self._invoke_smart(['config', '--set', 'rpm-extra-macros._prefer_color=%s'
+                        % prefer_color])
 
         self._invoke_smart(cmd)
-        self._invoke_smart('config --set rpm-ignoresize=1')
+        self._invoke_smart(['config', '--set', 'rpm-ignoresize=1'])
 
         # Write common configuration for host and target usage
-        self._invoke_smart('config --set rpm-nolinktos=1')
-        self._invoke_smart('config --set rpm-noparentdirs=1')
+        self._invoke_smart(['config', '--set', 'rpm-nolinktos=1'])
+        self._invoke_smart(['config', '--set', 'rpm-noparentdirs=1'])
         check_signature = self.d.getVar('RPM_CHECK_SIGNATURES', True)
         if check_signature and check_signature.strip() == "0":
-            self._invoke_smart('config --set rpm-check-signatures=false')
+            self._invoke_smart(['config', '--set rpm-check-signatures=false'])
         for i in self.d.getVar('BAD_RECOMMENDATIONS', True).split():
-            self._invoke_smart('flag --set ignore-recommends %s' % i)
+            self._invoke_smart(['flag', '--set', 'ignore-recommends', i])
 
         # Do the following configurations here, to avoid them being
         # saved for field upgrade
         if self.d.getVar('NO_RECOMMENDATIONS', True).strip() == "1":
-            self._invoke_smart('config --set ignore-all-recommends=1')
+            self._invoke_smart(['config', '--set', 'ignore-all-recommends=1'])
         pkg_exclude = self.d.getVar('PACKAGE_EXCLUDE', True) or ""
         for i in pkg_exclude.split():
-            self._invoke_smart('flag --set exclude-packages %s' % i)
+            self._invoke_smart(['flag', '--set', 'exclude-packages', i])
 
         # Optional debugging
-        # self._invoke_smart('config --set rpm-log-level=debug')
-        # cmd = 'config --set rpm-log-file=/tmp/smart-debug-logfile'
+        # self._invoke_smart(['config', '--set', 'rpm-log-level=debug'])
+        # cmd = ['config', '--set', 'rpm-log-file=/tmp/smart-debug-logfile']
         # self._invoke_smart(cmd)
         ch_already_added = []
         for canonical_arch in platform_extra:
@@ -1030,16 +1033,16 @@ class RpmPM(PackageManager):
             if not arch in ch_already_added:
                 bb.note('Adding Smart channel %s (%s)' %
                         (arch, channel_priority))
-                self._invoke_smart('channel --add %s type=rpm-md baseurl=%s -y'
-                                   % (arch, arch_channel))
-                self._invoke_smart('channel --set %s priority=%d' %
-                                   (arch, channel_priority))
+                self._invoke_smart(['channel', '--add', arch, 'type=rpm-md',
+                    'baseurl=%s' % arch_channel, '-y'])
+                self._invoke_smart(['channel', '--set', arch, 'priority=%d' %
+                                   channel_priority])
                 channel_priority -= 5
 
                 ch_already_added.append(arch)
 
         bb.note('adding Smart RPM DB channel')
-        self._invoke_smart('channel --add rpmsys type=rpm-sys -y')
+        self._invoke_smart(['channel', '--add', 'rpmsys', 'type=rpm-sys', '-y'])
 
         # Construct install scriptlet wrapper.
         # Scripts need to be ordered when executed, this ensures numeric order.
@@ -1102,15 +1105,15 @@ class RpmPM(PackageManager):
 
         bb.note("configuring RPM cross-install scriptlet_wrapper")
         os.chmod(self.scriptlet_wrapper, 0o755)
-        cmd = 'config --set rpm-extra-macros._cross_scriptlet_wrapper=%s' % \
-              self.scriptlet_wrapper
+        cmd = ['config', '--set', 'rpm-extra-macros._cross_scriptlet_wrapper=%s' %
+              self.scriptlet_wrapper]
         self._invoke_smart(cmd)
 
         # Debug to show smart config info
-        # bb.note(self._invoke_smart('config --show'))
+        # bb.note(self._invoke_smart(['config', '--show']))
 
     def update(self):
-        self._invoke_smart('update rpmsys')
+        self._invoke_smart(['update', 'rpmsys'])
 
     def get_rdepends_recursively(self, pkgs):
         # pkgs will be changed during the loop, so use [:] to make a copy.
@@ -1207,20 +1210,19 @@ class RpmPM(PackageManager):
             return
         if not attempt_only:
             bb.note('to be installed: %s' % ' '.join(pkgs))
-            cmd = "%s %s install -y %s" % \
-                  (self.smart_cmd, self.smart_opt, ' '.join(pkgs))
-            bb.note(cmd)
+            cmd = [self.smart_cmd] + self.smart_opt + ["install", "-y"] + pkgs
+            bb.note(' '.join(cmd))
         else:
             bb.note('installing attempt only packages...')
             bb.note('Attempting %s' % ' '.join(pkgs))
-            cmd = "%s %s install --attempt -y %s" % \
-                  (self.smart_cmd, self.smart_opt, ' '.join(pkgs))
+            cmd = [self.smart_cmd] + self.smart_opt + ["install", "--attempt",
+                    "-y"] + pkgs
         try:
-            output = subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT).decode("utf-8")
+            output = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode("utf-8")
             bb.note(output)
         except subprocess.CalledProcessError as e:
             bb.fatal("Unable to install packages. Command '%s' "
-                     "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
+                     "returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
 
     '''
     Remove pkgs with smart, the pkg name is smart/rpm format
@@ -1229,24 +1231,19 @@ class RpmPM(PackageManager):
         bb.note('to be removed: ' + ' '.join(pkgs))
 
         if not with_dependencies:
-            cmd = "%s -e --nodeps " % self.rpm_cmd
-            cmd += "--root=%s " % self.target_rootfs
-            cmd += "--dbpath=/var/lib/rpm "
-            cmd += "--define='_cross_scriptlet_wrapper %s' " % \
-                   self.scriptlet_wrapper
-            cmd += "--define='_tmppath /%s/tmp' %s" % (self.install_dir_name, ' '.join(pkgs))
+            cmd = [self.rpm_cmd] + ["-e", "--nodeps", "--root=%s" %
+                    self.target_rootfs, "--dbpath=/var/lib/rpm",
+                    "--define='_cross_scriptlet_wrapper %s'" %
+                    self.scriptlet_wrapper,
+                    "--define='_tmppath /%s/tmp'" % self.install_dir_name] + pkgs
         else:
             # for pkg in pkgs:
             #   bb.note('Debug: What required: %s' % pkg)
-            #   bb.note(self._invoke_smart('query %s --show-requiredby' % pkg))
-
-            cmd = "%s %s remove -y %s" % (self.smart_cmd,
-                                          self.smart_opt,
-                                          ' '.join(pkgs))
-
+            #   bb.note(self._invoke_smart(['query', pkg, '--show-requiredby']))
+            cmd = [self.smart_cmd] + self.smart_opt + ["remove", "-y"] + pkgs
         try:
-            bb.note(cmd)
-            output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).decode("utf-8")
+            bb.note(' '.join(cmd))
+            output = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode("utf-8")
             bb.note(output)
         except subprocess.CalledProcessError as e:
             bb.note("Unable to remove packages. Command '%s' "
@@ -1254,7 +1251,7 @@ class RpmPM(PackageManager):
 
     def upgrade(self):
         bb.note('smart upgrade')
-        self._invoke_smart('upgrade')
+        self._invoke_smart(['upgrade'])
 
     def write_index(self):
         result = self.indexer.write_index()
@@ -1307,16 +1304,13 @@ class RpmPM(PackageManager):
         pkgs = self._pkg_translate_oe_to_smart(pkgs, False)
         install_pkgs = list()
 
-        cmd = "%s %s install -y --dump %s 2>%s" %  \
-              (self.smart_cmd,
-               self.smart_opt,
-               ' '.join(pkgs),
-               self.solution_manifest)
+        cmd = [self.smart_cmd] + self.smart_opt + ['install', '-y', '--dump',
+                self.solution_manifest]
         try:
             # Disable rpmsys channel for the fake install
-            self._invoke_smart('channel --disable rpmsys')
+            self._invoke_smart(['channel', '--disable', 'rpmsys'])
 
-            subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
+            subprocess.check_output(cmd, stderr=subprocess.STDOUT)
             with open(self.solution_manifest, 'r') as manifest:
                 for pkg in manifest.read().split('\n'):
                     if '@' in pkg:
@@ -1325,7 +1319,7 @@ class RpmPM(PackageManager):
             bb.note("Unable to dump install packages. Command '%s' "
                     "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
         # Recovery rpmsys channel
-        self._invoke_smart('channel --enable rpmsys')
+        self._invoke_smart(['channel', '--enable', 'rpmsys'])
         return install_pkgs
 
     '''
@@ -1355,17 +1349,16 @@ class RpmPM(PackageManager):
     def dump_all_available_pkgs(self):
         available_manifest = self.d.expand('${T}/saved/available_pkgs.txt')
         available_pkgs = list()
-        cmd = "%s %s query --output %s" %  \
-              (self.smart_cmd, self.smart_opt, available_manifest)
+        cmd = [self.smart_cmd] + self.smart_opt + ['query', '--output', available_manifest]
         try:
-            subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
+            subprocess.check_output(cmd, stderr=subprocess.STDOUT)
             with open(available_manifest, 'r') as manifest:
                 for pkg in manifest.read().split('\n'):
                     if '@' in pkg:
                         available_pkgs.append(pkg.strip())
         except subprocess.CalledProcessError as e:
             bb.note("Unable to list all available packages. Command '%s' "
-                    "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
+                    "returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
 
         self.fullpkglist = available_pkgs
 
@@ -1404,11 +1397,11 @@ class RpmPM(PackageManager):
         bb.utils.remove(os.path.join(self.target_rootfs, 'var/lib/smart'),
                         True)
 
-        self._invoke_smart('config --set rpm-nolinktos=1')
-        self._invoke_smart('config --set rpm-noparentdirs=1')
+        self._invoke_smart(['config', '--set', 'rpm-nolinktos=1'])
+        self._invoke_smart(['config', '--set', 'rpm-noparentdirs=1'])
         for i in self.d.getVar('BAD_RECOMMENDATIONS', True).split():
-            self._invoke_smart('flag --set ignore-recommends %s' % i)
-        self._invoke_smart('channel --add rpmsys type=rpm-sys -y')
+            self._invoke_smart(['flag', '--set', 'ignore-recommends', i])
+        self._invoke_smart(['channel', '--add', 'rpmsys', 'type=rpm-sys', '-y'])
 
     '''
     The rpm db lock files were produced after invoking rpm to query on
@@ -1425,12 +1418,12 @@ class RpmPM(PackageManager):
     Returns a dictionary with the package info.
     """
     def package_info(self, pkg):
-        cmd = "%s %s info --urls %s" % (self.smart_cmd, self.smart_opt, pkg)
+        cmd = [self.smart_cmd] + self.smart_opt + ['info', '--urls', pkg]
         try:
-            output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).decode("utf-8")
+            output = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode("utf-8")
         except subprocess.CalledProcessError as e:
             bb.fatal("Unable to list available packages. Command '%s' "
-                     "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
+                     "returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output.decode("utf-8")))
 
         # Set default values to avoid UnboundLocalError
         arch = ""
@@ -1550,18 +1543,18 @@ class OpkgDpkgPM(PackageManager):
         os.chdir(tmp_dir)
 
         try:
-            cmd = "%s x %s" % (ar_cmd, pkg_path)
-            output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
-            cmd = "%s xf data.tar.*" % tar_cmd
-            output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
+            cmd = [ar_cmd, 'x', pkg_path]
+            output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
+            cmd = [tar_cmd, 'xf', 'data.tar.*']
+            output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
         except subprocess.CalledProcessError as e:
             bb.utils.remove(tmp_dir, recurse=True)
             bb.fatal("Unable to extract %s package. Command '%s' "
-                     "returned %d:\n%s" % (pkg_path, cmd, e.returncode, e.output.decode("utf-8")))
+                     "returned %d:\n%s" % (pkg_path, ' '.join(cmd), e.returncode, e.output.decode("utf-8")))
         except OSError as e:
             bb.utils.remove(tmp_dir, recurse=True)
             bb.fatal("Unable to extract %s package. Command '%s' "
-                     "returned %d:\n%s at %s" % (pkg_path, cmd, e.errno, e.strerror, e.filename))
+                     "returned %d:\n%s at %s" % (pkg_path, ' '.join(cmd), e.errno, e.strerror, e.filename))
 
         bb.note("Extracted %s to %s" % (pkg_path, tmp_dir))
         bb.utils.remove(os.path.join(tmp_dir, "debian-binary"))
-- 
2.10.2



^ permalink raw reply related

* [PATCH] bluez5: 5.42 -> 5.43
From: huangqy @ 2016-11-30 13:31 UTC (permalink / raw)
  To: openembedded-core

From: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>

Upgrade bluez5 from 5.42 to 5.43.

Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>
---
 meta/recipes-connectivity/bluez5/{bluez5_5.42.bb => bluez5_5.43.bb} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-connectivity/bluez5/{bluez5_5.42.bb => bluez5_5.43.bb} (89%)

diff --git a/meta/recipes-connectivity/bluez5/bluez5_5.42.bb b/meta/recipes-connectivity/bluez5/bluez5_5.43.bb
similarity index 89%
rename from meta/recipes-connectivity/bluez5/bluez5_5.42.bb
rename to meta/recipes-connectivity/bluez5/bluez5_5.43.bb
index e6ab9b6..e10b82d 100644
--- a/meta/recipes-connectivity/bluez5/bluez5_5.42.bb
+++ b/meta/recipes-connectivity/bluez5/bluez5_5.43.bb
@@ -2,8 +2,8 @@ require bluez5.inc
 
 REQUIRED_DISTRO_FEATURES = "bluez5"
 
-SRC_URI[md5sum] = "cc8c53133d5be0d6c126e00cf2529028"
-SRC_URI[sha256sum] = "4f166fed80fc017396d6f2b3cae5185520875ab456d1c74d6b4eaa4da0e16109"
+SRC_URI[md5sum] = "698def88df96840dfbb0858bb6d73350"
+SRC_URI[sha256sum] = "16c9c05d2a1da644ce3570d975ada3643d2e60c007a955bac09c0a0efeb58d15"
 
 # noinst programs in Makefile.tools that are conditional on READLINE
 # support
-- 
2.7.4





^ permalink raw reply related

* [PATCH] iw: 4.7 -> 4.9
From: huangqy @ 2016-11-30 14:04 UTC (permalink / raw)
  To: openembedded-core

From: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>

Upgrade iw from 4.7 to 4.9.

Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>
---
 meta/recipes-connectivity/iw/{iw_4.7.bb => iw_4.9.bb} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-connectivity/iw/{iw_4.7.bb => iw_4.9.bb} (86%)

diff --git a/meta/recipes-connectivity/iw/iw_4.7.bb b/meta/recipes-connectivity/iw/iw_4.9.bb
similarity index 86%
rename from meta/recipes-connectivity/iw/iw_4.7.bb
rename to meta/recipes-connectivity/iw/iw_4.9.bb
index e9f4141..6daeb07 100644
--- a/meta/recipes-connectivity/iw/iw_4.7.bb
+++ b/meta/recipes-connectivity/iw/iw_4.9.bb
@@ -14,8 +14,8 @@ SRC_URI = "http://www.kernel.org/pub/software/network/iw/${BP}.tar.gz \
            file://separate-objdir.patch \
 "
 
-SRC_URI[md5sum] = "19d1edd276b2ac0c6cccfc7ae8d2b732"
-SRC_URI[sha256sum] = "758092229f13d691968060a0ad41364ba8eb8da4503626c20233a5b1eb33b4d9"
+SRC_URI[md5sum] = "06e96ab7a5c652f8eaed6f71533a9e0f"
+SRC_URI[sha256sum] = "12f921f3dbe0f33c309f5f2891cccf5325c94bd48dceeb102de183f5f048a9e2"
 
 inherit pkgconfig
 
-- 
2.7.4





^ permalink raw reply related

* [PATCH] man-pages: 4.07 -> 4.08
From: huangqy @ 2016-11-30 15:05 UTC (permalink / raw)
  To: openembedded-core

From: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>

Upgrade man-pages from 4.07 to 4.08.

Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>
---
 .../man-pages/{man-pages_4.07.bb => man-pages_4.08.bb}                | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-extended/man-pages/{man-pages_4.07.bb => man-pages_4.08.bb} (86%)

diff --git a/meta/recipes-extended/man-pages/man-pages_4.07.bb b/meta/recipes-extended/man-pages/man-pages_4.08.bb
similarity index 86%
rename from meta/recipes-extended/man-pages/man-pages_4.07.bb
rename to meta/recipes-extended/man-pages/man-pages_4.08.bb
index 76a3fd8..8fc6cb0 100644
--- a/meta/recipes-extended/man-pages/man-pages_4.07.bb
+++ b/meta/recipes-extended/man-pages/man-pages_4.08.bb
@@ -7,8 +7,8 @@ LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://README;md5=8f2a3d43057d458e5066714980567a60"
 SRC_URI = "${KERNELORG_MIRROR}/linux/docs/${BPN}/Archive/${BP}.tar.gz"
 
-SRC_URI[md5sum] = "05ba1cb21e99d02bd7bc1a59378965d2"
-SRC_URI[sha256sum] = "c973351131931f7700f5e9fbf4ef366c43ea7c1515d282e8d5db9c77590c4c93"
+SRC_URI[md5sum] = "88760ffa6cf92495327758b828850015"
+SRC_URI[sha256sum] = "1fa6529ab2784e7db2a498feb2c5307f4afb87dff0e3321e5964265e2e8433fd"
 
 RDEPENDS_${PN} = "man"
 
-- 
2.7.4





^ permalink raw reply related

* [PATCH] gstreamer1.0: Upgrade to 1.10.1
From: Khem Raj @ 2016-11-30  7:39 UTC (permalink / raw)
  To: openembedded-core

Remove backported patches and upstreamed ones
Drop --disable-trace its no more in 1.10.x

Add packageconfig option for kms, keep it disabled by default
in bad plugins recipe

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...libav_1.8.3.bb => gstreamer1.0-libav_1.10.1.bb} |   5 +-
 .../gstreamer/gstreamer1.0-plugins-bad.inc         |   1 +
 ...-don-t-hardcode-libtool-name-when-running.patch |  35 +-
 ...gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch |  15 +-
 ...lplugin-enable-gldeinterlace-on-OpenGL-ES.patch | 634 ---------------------
 ...ert-implement-multiple-render-targets-for.patch | 244 --------
 ...ert-don-t-use-the-predefined-variable-nam.patch |  32 --
 .../0005-glshader-add-glBindFragDataLocation.patch |  77 ---
 ...ert-GLES3-deprecates-texture2D-and-it-doe.patch |  51 --
 .../0008-gl-implement-GstGLMemoryEGL.patch         | 495 ----------------
 ...valid-sentinels-for-gst_structure_get-etc.patch |  59 +-
 ...1.8.3.bb => gstreamer1.0-plugins-bad_1.10.1.bb} |  10 +-
 ....8.3.bb => gstreamer1.0-plugins-base_1.10.1.bb} |   5 +-
 ....8.3.bb => gstreamer1.0-plugins-good_1.10.1.bb} |   5 +-
 ....8.3.bb => gstreamer1.0-plugins-ugly_1.10.1.bb} |   5 +-
 .../gstreamer/gstreamer1.0-rtsp-server_1.10.1.bb   |   6 +
 .../gstreamer/gstreamer1.0-rtsp-server_1.8.3.bb    |   6 -
 meta/recipes-multimedia/gstreamer/gstreamer1.0.inc |   1 -
 ...streamer1.0_1.8.3.bb => gstreamer1.0_1.10.1.bb} |   5 +-
 19 files changed, 69 insertions(+), 1622 deletions(-)
 rename meta/recipes-multimedia/gstreamer/{gstreamer1.0-libav_1.8.3.bb => gstreamer1.0-libav_1.10.1.bb} (86%)
 delete mode 100755 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch
 delete mode 100755 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-glcolorconvert-implement-multiple-render-targets-for.patch
 delete mode 100755 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch
 delete mode 100755 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glshader-add-glBindFragDataLocation.patch
 delete mode 100755 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-glcolorconvert-GLES3-deprecates-texture2D-and-it-doe.patch
 delete mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-gl-implement-GstGLMemoryEGL.patch
 rename meta/recipes-multimedia/gstreamer/{gstreamer1.0-plugins-bad_1.8.3.bb => gstreamer1.0-plugins-bad_1.10.1.bb} (64%)
 rename meta/recipes-multimedia/gstreamer/{gstreamer1.0-plugins-base_1.8.3.bb => gstreamer1.0-plugins-base_1.10.1.bb} (85%)
 rename meta/recipes-multimedia/gstreamer/{gstreamer1.0-plugins-good_1.8.3.bb => gstreamer1.0-plugins-good_1.10.1.bb} (84%)
 rename meta/recipes-multimedia/gstreamer/{gstreamer1.0-plugins-ugly_1.8.3.bb => gstreamer1.0-plugins-ugly_1.10.1.bb} (76%)
 create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.10.1.bb
 delete mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.8.3.bb
 rename meta/recipes-multimedia/gstreamer/{gstreamer1.0_1.8.3.bb => gstreamer1.0_1.10.1.bb} (69%)

diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.8.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.10.1.bb
similarity index 86%
rename from meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.8.3.bb
rename to meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.10.1.bb
index 3d86221..98f5a50 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.8.3.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.10.1.bb
@@ -13,8 +13,7 @@ SRC_URI = " \
     file://0001-Disable-yasm-for-libav-when-disable-yasm.patch \
     file://workaround-to-build-gst-libav-for-i586-with-gcc.patch \
 "
-
-SRC_URI[md5sum] = "b51a736147bacb40f85827a4e0ae0d2c"
-SRC_URI[sha256sum] = "9006a05990089f7155ee0e848042f6bb24e52ab1d0a59ff8d1b5d7e33001a495"
+SRC_URI[md5sum] = "9dc8fb8dd01818c27230a1ed6ba9f4de"
+SRC_URI[sha256sum] = "27b28b8de0e6dff1e3952428e8ed8ba4a12f452f789ac0ae9bbe50f00a5c72c7"
 
 S = "${WORKDIR}/gst-libav-${PV}"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
index 0fe5564..d26a6a9 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
@@ -42,6 +42,7 @@ PACKAGECONFIG[gtk]             = "--enable-gtk3,--disable-gtk3,gtk+3"
 # ensure OpenSSL is used for HLS AES description instead of nettle
 # (OpenSSL is a shared dependency with dtls)
 PACKAGECONFIG[hls]             = "--enable-hls --with-hls-crypto=openssl,--disable-hls,openssl"
+PACKAGECONFIG[kms]             = "--enable-kms,--disable-kms,libdrm"
 PACKAGECONFIG[libmms]          = "--enable-libmms,--disable-libmms,libmms"
 PACKAGECONFIG[libssh2]         = "--enable-libssh2,--disable-libssh2,libssh2"
 PACKAGECONFIG[modplug]         = "--enable-modplug,--disable-modplug,libmodplug"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch
index 33efc50..43f1ee0 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch
@@ -13,24 +13,24 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
  gst-libs/gst/mpegts/Makefile.am    | 2 +-
  3 files changed, 3 insertions(+), 3 deletions(-)
 
-diff --git a/gst-libs/gst/gl/Makefile.am b/gst-libs/gst/gl/Makefile.am
-index f968357..7cc2c7a 100644
---- a/gst-libs/gst/gl/Makefile.am
-+++ b/gst-libs/gst/gl/Makefile.am
-@@ -167,7 +167,7 @@ GstGL-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstgl-@GST_API_VERSION@
- 		--library=libgstgl-@GST_API_VERSION@.la \
+Index: gst-plugins-bad-1.10.1/gst-libs/gst/gl/Makefile.am
+===================================================================
+--- gst-plugins-bad-1.10.1.orig/gst-libs/gst/gl/Makefile.am
++++ gst-plugins-bad-1.10.1/gst-libs/gst/gl/Makefile.am
+@@ -171,7 +171,7 @@ GstGL-@GST_API_VERSION@.gir: $(INTROSPEC
  		--include=Gst-@GST_API_VERSION@ \
  		--include=GstBase-@GST_API_VERSION@ \
+ 		--include=GstVideo-@GST_API_VERSION@ \
 -		--libtool="$(top_builddir)/libtool" \
 +		--libtool="$(LIBTOOL)" \
  		--pkg gstreamer-@GST_API_VERSION@ \
  		--pkg gstreamer-base-@GST_API_VERSION@ \
  		--pkg gstreamer-video-@GST_API_VERSION@ \
-diff --git a/gst-libs/gst/insertbin/Makefile.am b/gst-libs/gst/insertbin/Makefile.am
-index 09eb97c..b746885 100644
---- a/gst-libs/gst/insertbin/Makefile.am
-+++ b/gst-libs/gst/insertbin/Makefile.am
-@@ -44,7 +44,7 @@ GstInsertBin-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstinsertbin-@GS
+Index: gst-plugins-bad-1.10.1/gst-libs/gst/insertbin/Makefile.am
+===================================================================
+--- gst-plugins-bad-1.10.1.orig/gst-libs/gst/insertbin/Makefile.am
++++ gst-plugins-bad-1.10.1/gst-libs/gst/insertbin/Makefile.am
+@@ -45,7 +45,7 @@ GstInsertBin-@GST_API_VERSION@.gir: $(IN
  		--library=libgstinsertbin-@GST_API_VERSION@.la \
  		--include=Gst-@GST_API_VERSION@ \
  		--include=GstBase-@GST_API_VERSION@ \
@@ -39,11 +39,11 @@ index 09eb97c..b746885 100644
  		--pkg gstreamer-@GST_API_VERSION@ \
  		--pkg gstreamer-base-@GST_API_VERSION@ \
  		--pkg-export gstreamer-insertbin-@GST_API_VERSION@ \
-diff --git a/gst-libs/gst/mpegts/Makefile.am b/gst-libs/gst/mpegts/Makefile.am
-index 2511d49..c1cbce6 100644
---- a/gst-libs/gst/mpegts/Makefile.am
-+++ b/gst-libs/gst/mpegts/Makefile.am
-@@ -78,7 +78,7 @@ GstMpegts-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstmpegts-@GST_API_
+Index: gst-plugins-bad-1.10.1/gst-libs/gst/mpegts/Makefile.am
+===================================================================
+--- gst-plugins-bad-1.10.1.orig/gst-libs/gst/mpegts/Makefile.am
++++ gst-plugins-bad-1.10.1/gst-libs/gst/mpegts/Makefile.am
+@@ -79,7 +79,7 @@ GstMpegts-@GST_API_VERSION@.gir: $(INTRO
  		--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-video-@GST_API_VERSION@` \
  		--library=libgstmpegts-@GST_API_VERSION@.la \
  		--include=Gst-@GST_API_VERSION@ \
@@ -52,6 +52,3 @@ index 2511d49..c1cbce6 100644
  		--pkg gstreamer-@GST_API_VERSION@ \
  		--pkg gstreamer-video-@GST_API_VERSION@ \
  		--pkg-export gstreamer-mpegts-@GST_API_VERSION@ \
--- 
-2.6.2
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch
index e81b065..9fc91d8 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch
@@ -12,16 +12,13 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
  pkgconfig/gstreamer-gl.pc.in | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/pkgconfig/gstreamer-gl.pc.in b/pkgconfig/gstreamer-gl.pc.in
-index 5589e2a..b986450 100644
---- a/pkgconfig/gstreamer-gl.pc.in
-+++ b/pkgconfig/gstreamer-gl.pc.in
+Index: gst-plugins-bad-1.10.1/pkgconfig/gstreamer-gl.pc.in
+===================================================================
+--- gst-plugins-bad-1.10.1.orig/pkgconfig/gstreamer-gl.pc.in
++++ gst-plugins-bad-1.10.1/pkgconfig/gstreamer-gl.pc.in
 @@ -10,4 +10,4 @@ Version: @VERSION@
  Requires: gstreamer-base-@GST_API_VERSION@ gstreamer-@GST_API_VERSION@
  
  Libs: -L${libdir} -lgstgl-@GST_API_VERSION@ @GL_LIBS@
--Cflags: -I${includedir} @GL_CFLAGS@
-+Cflags: -I${includedir}
--- 
-2.7.0
-
+-Cflags: -I${includedir} -I${libdir}/gstreamer-@GST_API_VERSION@/include @GL_CFLAGS@
++Cflags: -I${includedir} -I${libdir}/gstreamer-@GST_API_VERSION@/include
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch
deleted file mode 100755
index 51f4eb4..0000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch
+++ /dev/null
@@ -1,634 +0,0 @@
-From 8a0e97f7e672301cc76e394855e8c7a3448b0249 Mon Sep 17 00:00:00 2001
-From: Haihua Hu <jared.hu@nxp.com>
-Date: Fri, 8 Apr 2016 16:47:15 +0800
-Subject: [PATCH 4/6] [glplugin] enable gldeinterlace on OpenGL ES
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-1.Porting the exist deinterlace shader and OpenGL callback
-  to be compatible with OpenGL ES.
-2.Add a our blur vertical shader to gldeinterlace.
-3.Add a property named “method” to let user choose which
-  deinterlace function to use. Default to choose blur vertical
-  method for better performance.
-
-Upstream-Status: Backport [1.9.1]
-
-https://bugzilla.gnome.org/show_bug.cgi?id=764873
-
-Signed-off-by: Haihua Hu <jared.hu@nxp.com>
----
- ext/gl/Makefile.am        |   4 +-
- ext/gl/gstgldeinterlace.c | 344 +++++++++++++++++++++++++++++++++++-----------
- ext/gl/gstgldeinterlace.h |   6 +-
- ext/gl/gstopengl.c        |  13 +-
- 4 files changed, 275 insertions(+), 92 deletions(-)
-
-diff --git a/ext/gl/Makefile.am b/ext/gl/Makefile.am
-index 5d55f54..46419a7 100644
---- a/ext/gl/Makefile.am
-+++ b/ext/gl/Makefile.am
-@@ -40,6 +40,7 @@ libgstopengl_la_SOURCES = \
- 	gstglfilterapp.c \
- 	gstglviewconvert.c \
- 	gstglstereosplit.c \
-+	gstgldeinterlace.c \
- 	gstglstereomix.c
- 
- noinst_HEADERS = \
-@@ -63,20 +64,19 @@ noinst_HEADERS = \
- 	gstglfilterapp.h \
- 	gstglstereosplit.h \
- 	gstglstereomix.h \
-+	gstgldeinterlace.h \
- 	gstglviewconvert.h
- 
- # full opengl required
- if USE_OPENGL
- libgstopengl_la_SOURCES += \
- 	gstglfilterglass.c \
--	gstgldeinterlace.c \
- 	gltestsrc.c \
- 	gstgltestsrc.c \
- 	gstglmosaic.c
- 
- noinst_HEADERS += \
- 	gstglfilterglass.h \
--	gstgldeinterlace.h \
- 	gltestsrc.h \
- 	gstgltestsrc.h \
- 	gstglmosaic.h \
-diff --git a/ext/gl/gstgldeinterlace.c b/ext/gl/gstgldeinterlace.c
-index bd0eff0..c1250dc 100644
---- a/ext/gl/gstgldeinterlace.c
-+++ b/ext/gl/gstgldeinterlace.c
-@@ -43,7 +43,8 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
- 
- enum
- {
--  PROP_0
-+  PROP_0,
-+  PROP_METHOD
- };
- 
- #define DEBUG_INIT \
-@@ -57,17 +58,23 @@ static void gst_gl_deinterlace_set_property (GObject * object,
- static void gst_gl_deinterlace_get_property (GObject * object,
-     guint prop_id, GValue * value, GParamSpec * pspec);
- 
-+static gboolean gst_gl_deinterlace_start (GstBaseTransform * trans);
- static gboolean gst_gl_deinterlace_reset (GstBaseTransform * trans);
--static gboolean gst_gl_deinterlace_init_shader (GstGLFilter * filter);
-+static gboolean gst_gl_deinterlace_init_fbo (GstGLFilter * filter);
- static gboolean gst_gl_deinterlace_filter (GstGLFilter * filter,
-     GstBuffer * inbuf, GstBuffer * outbuf);
- static gboolean gst_gl_deinterlace_filter_texture (GstGLFilter * filter,
-     guint in_tex, guint out_tex);
--static void gst_gl_deinterlace_callback (gint width, gint height,
-+static void gst_gl_deinterlace_vfir_callback (gint width, gint height,
-+    guint texture, gpointer stuff);
-+static void gst_gl_deinterlace_greedyh_callback (gint width, gint height,
-     guint texture, gpointer stuff);
- 
- /* *INDENT-OFF* */
- static const gchar *greedyh_fragment_source =
-+  "#ifdef GL_ES\n"
-+  "precision mediump float;\n"
-+  "#endif\n"
-   "uniform sampler2D tex;\n"
-   "uniform sampler2D tex_prev;\n"
-   "uniform float max_comb;\n"
-@@ -75,35 +82,35 @@ static const gchar *greedyh_fragment_source =
-   "uniform float motion_sense;\n"
-   "uniform float width;\n"
-   "uniform float height;\n"
-+  "varying vec2 v_texcoord;\n"
- 
-   "void main () {\n"
--  "  vec2 texcoord = gl_TexCoord[0].xy;\n"
--  "  if (int(mod(texcoord.y * height, 2.0)) == 0) {\n"
--  "    gl_FragColor = vec4(texture2D(tex_prev, texcoord).rgb, 1.0);\n"
-+  "  if (int(mod(v_texcoord.y * height, 2.0)) == 0) {\n"
-+  "    gl_FragColor = vec4(texture2D(tex_prev, v_texcoord).rgb, 1.0);\n"
-   "  } else {\n"
-   "    vec2 texcoord_L1_a1, texcoord_L3_a1, texcoord_L1, texcoord_L3, texcoord_L1_1, texcoord_L3_1;\n"
-   "    vec3 L1_a1, L3_a1, L1, L3, L1_1, L3_1;\n"
- 
--  "    texcoord_L1 = vec2(texcoord.x, texcoord.y - 1.0 / height);\n"
--  "    texcoord_L3 = vec2(texcoord.x, texcoord.y + 1.0 / height);\n"
-+  "    texcoord_L1 = vec2(v_texcoord.x, v_texcoord.y - 1.0 / height);\n"
-+  "    texcoord_L3 = vec2(v_texcoord.x, v_texcoord.y + 1.0 / height);\n"
-   "    L1 = texture2D(tex_prev, texcoord_L1).rgb;\n"
-   "    L3 = texture2D(tex_prev, texcoord_L3).rgb;\n"
--  "    if (texcoord.x == 1.0 && texcoord.y == 1.0) {\n"
-+  "    if (v_texcoord.x == 1.0 && v_texcoord.y == 1.0) {\n"
-   "      L1_1 = L1;\n"
-   "      L3_1 = L3;\n"
-   "    } else {\n"
--  "      texcoord_L1_1 = vec2(texcoord.x + 1.0 / width, texcoord.y - 1.0 / height);\n"
--  "      texcoord_L3_1 = vec2(texcoord.x + 1.0 / width, texcoord.y + 1.0 / height);\n"
-+  "      texcoord_L1_1 = vec2(v_texcoord.x + 1.0 / width, v_texcoord.y - 1.0 / height);\n"
-+  "      texcoord_L3_1 = vec2(v_texcoord.x + 1.0 / width, v_texcoord.y + 1.0 / height);\n"
-   "      L1_1 = texture2D(tex_prev, texcoord_L1_1).rgb;\n"
-   "      L3_1 = texture2D(tex_prev, texcoord_L3_1).rgb;\n"
-   "    }\n"
- 
--  "    if (int(ceil(texcoord.x + texcoord.y)) == 0) {\n"
-+  "    if (int(ceil(v_texcoord.x + v_texcoord.y)) == 0) {\n"
-   "      L1_a1 = L1;\n"
-   "      L3_a1 = L3;\n"
-   "    } else {\n"
--  "      texcoord_L1_a1 = vec2(texcoord.x - 1.0 / width, texcoord.y - 1.0 / height);\n"
--  "      texcoord_L3_a1 = vec2(texcoord.x - 1.0 / width, texcoord.y + 1.0 / height);\n"
-+  "      texcoord_L1_a1 = vec2(v_texcoord.x - 1.0 / width, v_texcoord.y - 1.0 / height);\n"
-+  "      texcoord_L3_a1 = vec2(v_texcoord.x - 1.0 / width, v_texcoord.y + 1.0 / height);\n"
-   "      L1_a1 = texture2D(tex_prev, texcoord_L1_a1).rgb;\n"
-   "      L3_a1 = texture2D(tex_prev, texcoord_L3_a1).rgb;\n"
-   "    }\n"
-@@ -113,8 +120,8 @@ static const gchar *greedyh_fragment_source =
-   "    vec3 avg_1 = (L1_1 + L3_1) / 2.0;\n"
-   "    vec3 avg_s = (avg_a1 + avg_1) / 2.0;\n"
-   "    vec3 avg_sc = (avg_s + avg) / 2.0;\n"
--  "    vec3 L2 = texture2D(tex, texcoord).rgb;\n"
--  "    vec3 LP2 = texture2D(tex_prev, texcoord).rgb;\n"
-+  "    vec3 L2 = texture2D(tex, v_texcoord).rgb;\n"
-+  "    vec3 LP2 = texture2D(tex_prev, v_texcoord).rgb;\n"
-   "    vec3 best;\n"
-   "    if (abs(L2.r - avg_sc.r) < abs(LP2.r - avg_sc.r)) {\n"
-   "      best.r = L2.r;\n" "    } else {\n"
-@@ -144,8 +151,87 @@ static const gchar *greedyh_fragment_source =
-   "    gl_FragColor = vec4(last, 1.0);\n"
-   "  }\n"
-   "}\n";
-+
-+const gchar *vfir_fragment_source =
-+  "#ifdef GL_ES\n"
-+  "precision mediump float;\n"
-+  "#endif\n"
-+  "uniform sampler2D tex;\n"
-+  "uniform float width;\n"
-+  "uniform float height;\n"
-+  "varying vec2 v_texcoord;\n"
-+  "void main()\n"
-+  "{\n"
-+  "  vec2 topcoord, botcoord;\n"
-+  "  vec4 cur_color, top_color, bot_color;\n"
-+  "  topcoord.x = v_texcoord.x;\n"
-+  "  botcoord.x = v_texcoord.x;\n"
-+  "  if (v_texcoord.y == 0.0 || v_texcoord.y == 1.0) {\n"
-+  "    topcoord.y = v_texcoord.y ;\n"
-+  "    botcoord.y = v_texcoord.y ;\n"
-+  "  }\n"
-+  "  else {\n"
-+  "    topcoord.y = v_texcoord.y - 1.0/height;\n"
-+  "    botcoord.y = v_texcoord.y + 1.0/height;\n"
-+  "  }\n"
-+  "  cur_color = texture2D(tex, v_texcoord);\n"
-+  "  top_color = texture2D(tex, topcoord);\n"
-+  "  bot_color = texture2D(tex, botcoord);\n"
-+  "  gl_FragColor = 0.5*cur_color + 0.25*top_color + 0.25*bot_color;\n"
-+  "}";
- /* *INDENT-ON* */
- 
-+/* dont' forget to edit the following when a new method is added */
-+typedef enum
-+{
-+  GST_GL_DEINTERLACE_VFIR,
-+  GST_GL_DEINTERLACE_GREEDYH
-+} GstGLDeinterlaceMethod;
-+
-+static const GEnumValue *
-+gst_gl_deinterlace_get_methods (void)
-+{
-+  static const GEnumValue method_types[] = {
-+    {GST_GL_DEINTERLACE_VFIR, "Blur Vertical", "vfir"},
-+    {GST_GL_DEINTERLACE_GREEDYH, "Motion Adaptive: Advanced Detection",
-+          "greedhy"},
-+    {0, NULL, NULL}
-+  };
-+  return method_types;
-+}
-+
-+#define GST_TYPE_GL_DEINTERLACE_METHODS (gst_gl_deinterlace_method_get_type ())
-+static GType
-+gst_gl_deinterlace_method_get_type (void)
-+{
-+  static GType gl_deinterlace_method_type = 0;
-+  if (!gl_deinterlace_method_type) {
-+    gl_deinterlace_method_type =
-+        g_enum_register_static ("GstGLDeinterlaceMethod",
-+        gst_gl_deinterlace_get_methods ());
-+  }
-+  return gl_deinterlace_method_type;
-+}
-+
-+static void
-+gst_gl_deinterlace_set_method (GstGLDeinterlace * deinterlace,
-+    guint method_types)
-+{
-+  switch (method_types) {
-+    case GST_GL_DEINTERLACE_VFIR:
-+      deinterlace->deinterlacefunc = gst_gl_deinterlace_vfir_callback;
-+      deinterlace->current_method = method_types;
-+      break;
-+    case GST_GL_DEINTERLACE_GREEDYH:
-+      deinterlace->deinterlacefunc = gst_gl_deinterlace_greedyh_callback;
-+      deinterlace->current_method = method_types;
-+      break;
-+    default:
-+      g_assert_not_reached ();
-+      break;
-+  }
-+}
-+
- static void
- gst_gl_deinterlace_class_init (GstGLDeinterlaceClass * klass)
- {
-@@ -163,25 +249,60 @@ gst_gl_deinterlace_class_init (GstGLDeinterlaceClass * klass)
-       "Deinterlacing based on fragment shaders",
-       "Julien Isorce <julien.isorce@mail.com>");
- 
-+  g_object_class_install_property (gobject_class,
-+      PROP_METHOD,
-+      g_param_spec_enum ("method",
-+          "Deinterlace Method",
-+          "Select which deinterlace method apply to GL video texture",
-+          GST_TYPE_GL_DEINTERLACE_METHODS,
-+          GST_GL_DEINTERLACE_VFIR, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-+
-+  GST_BASE_TRANSFORM_CLASS (klass)->start = gst_gl_deinterlace_start;
-   GST_BASE_TRANSFORM_CLASS (klass)->stop = gst_gl_deinterlace_reset;
- 
-   GST_GL_FILTER_CLASS (klass)->filter = gst_gl_deinterlace_filter;
-   GST_GL_FILTER_CLASS (klass)->filter_texture =
-       gst_gl_deinterlace_filter_texture;
--  GST_GL_FILTER_CLASS (klass)->init_fbo = gst_gl_deinterlace_init_shader;
-+  GST_GL_FILTER_CLASS (klass)->init_fbo = gst_gl_deinterlace_init_fbo;
- 
--  GST_GL_BASE_FILTER_CLASS (klass)->supported_gl_api = GST_GL_API_OPENGL;
-+  GST_GL_BASE_FILTER_CLASS (klass)->supported_gl_api =
-+      GST_GL_API_OPENGL | GST_GL_API_GLES2 | GST_GL_API_OPENGL3;
- }
- 
- static void
- gst_gl_deinterlace_init (GstGLDeinterlace * filter)
- {
--  filter->shader = NULL;
-+  filter->shaderstable = NULL;
-+  filter->deinterlacefunc = gst_gl_deinterlace_vfir_callback;
-+  filter->current_method = GST_GL_DEINTERLACE_VFIR;
-   filter->prev_buffer = NULL;
-   filter->prev_tex = 0;
- }
- 
- static gboolean
-+gst_gl_deinterlace_start (GstBaseTransform * trans)
-+{
-+  GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (trans);
-+
-+  deinterlace_filter->shaderstable = g_hash_table_new (g_str_hash, g_str_equal);
-+
-+  return GST_BASE_TRANSFORM_CLASS (parent_class)->start (trans);
-+}
-+
-+static void
-+gst_gl_deinterlace_ghash_func_clean (gpointer key, gpointer value,
-+    gpointer data)
-+{
-+  GstGLShader *shader = (GstGLShader *) value;
-+  GstGLFilter *filter = (GstGLFilter *) data;
-+
-+  //blocking call, wait the opengl thread has destroyed the shader
-+  gst_gl_context_del_shader (GST_GL_BASE_FILTER (filter)->context, shader);
-+
-+  value = NULL;
-+}
-+
-+static gboolean
- gst_gl_deinterlace_reset (GstBaseTransform * trans)
- {
-   GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (trans);
-@@ -189,10 +310,17 @@ gst_gl_deinterlace_reset (GstBaseTransform * trans)
-   gst_buffer_replace (&deinterlace_filter->prev_buffer, NULL);
- 
-   //blocking call, wait the opengl thread has destroyed the shader
--  if (deinterlace_filter->shader)
--    gst_gl_context_del_shader (GST_GL_BASE_FILTER (trans)->context,
--        deinterlace_filter->shader);
--  deinterlace_filter->shader = NULL;
-+  if (deinterlace_filter->shaderstable) {
-+    /* release shaders in the gl thread */
-+    g_hash_table_foreach (deinterlace_filter->shaderstable,
-+        gst_gl_deinterlace_ghash_func_clean, deinterlace_filter);
-+
-+    /* clean the htable without calling values destructors
-+     * because shaders have been released in the glthread
-+     * through the foreach func */
-+    g_hash_table_unref (deinterlace_filter->shaderstable);
-+    deinterlace_filter->shaderstable = NULL;
-+  }
- 
-   return GST_BASE_TRANSFORM_CLASS (parent_class)->stop (trans);
- }
-@@ -201,9 +329,12 @@ static void
- gst_gl_deinterlace_set_property (GObject * object, guint prop_id,
-     const GValue * value, GParamSpec * pspec)
- {
--  //GstGLDeinterlace *filter = GST_GL_DEINTERLACE (object);
-+  GstGLDeinterlace *filter = GST_GL_DEINTERLACE (object);
- 
-   switch (prop_id) {
-+    case PROP_METHOD:
-+      gst_gl_deinterlace_set_method (filter, g_value_get_enum (value));
-+      break;
-     default:
-       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-       break;
-@@ -214,9 +345,12 @@ static void
- gst_gl_deinterlace_get_property (GObject * object, guint prop_id,
-     GValue * value, GParamSpec * pspec)
- {
--  //GstGLDeinterlace *filter = GST_GL_DEINTERLACE (object);
-+  GstGLDeinterlace *filter = GST_GL_DEINTERLACE (object);
- 
-   switch (prop_id) {
-+    case PROP_METHOD:
-+      g_value_set_enum (value, filter->current_method);
-+      break;
-     default:
-       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-       break;
-@@ -224,13 +358,9 @@ gst_gl_deinterlace_get_property (GObject * object, guint prop_id,
- }
- 
- static gboolean
--gst_gl_deinterlace_init_shader (GstGLFilter * filter)
-+gst_gl_deinterlace_init_fbo (GstGLFilter * filter)
- {
--  GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (filter);
--
--  //blocking call, wait the opengl thread has compiled the shader
--  return gst_gl_context_gen_shader (GST_GL_BASE_FILTER (filter)->context, 0,
--      greedyh_fragment_source, &deinterlace_filter->shader);
-+  return TRUE;
- }
- 
- static gboolean
-@@ -241,7 +371,7 @@ gst_gl_deinterlace_filter_texture (GstGLFilter * filter, guint in_tex,
- 
-   //blocking call, use a FBO
-   gst_gl_filter_render_to_target (filter, TRUE, in_tex, out_tex,
--      gst_gl_deinterlace_callback, deinterlace_filter);
-+      deinterlace_filter->deinterlacefunc, deinterlace_filter);
- 
-   return TRUE;
- }
-@@ -259,36 +389,104 @@ gst_gl_deinterlace_filter (GstGLFilter * filter, GstBuffer * inbuf,
-   return TRUE;
- }
- 
--//opengl scene, params: input texture (not the output filter->texture)
-+static GstGLShader *
-+gst_gl_deinterlace_get_fragment_shader (GstGLFilter * filter,
-+    const gchar * shader_name, const gchar * shader_source)
-+{
-+  GstGLShader *shader = NULL;
-+  GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (filter);
-+  GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
-+
-+  shader = g_hash_table_lookup (deinterlace_filter->shaderstable, shader_name);
-+
-+  if (!shader) {
-+    GError *error = NULL;
-+
-+    if (!(shader = gst_gl_shader_new_link_with_stages (context, &error,
-+                gst_glsl_stage_new_default_vertex (context),
-+                gst_glsl_stage_new_with_string (context, GL_FRAGMENT_SHADER,
-+                    GST_GLSL_VERSION_NONE,
-+                    GST_GLSL_PROFILE_ES | GST_GLSL_PROFILE_COMPATIBILITY,
-+                    shader_source), NULL))) {
-+      GST_ELEMENT_ERROR (deinterlace_filter, RESOURCE, NOT_FOUND,
-+          ("Failed to initialize %s shader", shader_name), (NULL));
-+    }
-+
-+    filter->draw_attr_position_loc =
-+        gst_gl_shader_get_attribute_location (shader, "a_position");
-+    filter->draw_attr_texture_loc =
-+        gst_gl_shader_get_attribute_location (shader, "a_texcoord");
-+  }
-+
-+  g_hash_table_insert (deinterlace_filter->shaderstable, (gchar *) shader_name,
-+      shader);
-+
-+  return shader;
-+}
-+
- static void
--gst_gl_deinterlace_callback (gint width, gint height, guint texture,
-+gst_gl_deinterlace_vfir_callback (gint width, gint height, guint texture,
-     gpointer stuff)
- {
--  GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (stuff);
-+  GstGLShader *shader;
-   GstGLFilter *filter = GST_GL_FILTER (stuff);
--  GstGLFuncs *gl = GST_GL_BASE_FILTER (filter)->context->gl_vtable;
-+  GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (filter);
-+  GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
-+  GstGLFuncs *gl = context->gl_vtable;
-+
-+  shader = gst_gl_deinterlace_get_fragment_shader (deinterlace_filter, "vfir",
-+      vfir_fragment_source);
-+
-+  if (!shader)
-+    return;
-+
-+#if GST_GL_HAVE_OPENGL
-+  if (USING_OPENGL (context)) {
-+    gl->MatrixMode (GL_PROJECTION);
-+    gl->LoadIdentity ();
-+  }
-+#endif
-+
-+  gst_gl_shader_use (shader);
-+
-+  gl->ActiveTexture (GL_TEXTURE0);
-+  gl->BindTexture (GL_TEXTURE_2D, texture);
-+
-+  gst_gl_shader_set_uniform_1i (shader, "tex", 0);
-+  gst_gl_shader_set_uniform_1f (shader, "width",
-+      GST_VIDEO_INFO_WIDTH (&filter->out_info));
-+  gst_gl_shader_set_uniform_1f (shader, "height",
-+      GST_VIDEO_INFO_HEIGHT (&filter->out_info));
-+
-+  gst_gl_filter_draw_texture (filter, texture, width, height);
-+}
-+
-+static void
-+gst_gl_deinterlace_greedyh_callback (gint width, gint height, guint texture,
-+    gpointer stuff)
-+{
-+  GstGLShader *shader;
-+  GstGLFilter *filter = GST_GL_FILTER (stuff);
-+  GstGLDeinterlace *deinterlace_filter = GST_GL_DEINTERLACE (filter);
-+  GstGLContext *context = GST_GL_BASE_FILTER (filter)->context;
-+  GstGLFuncs *gl = context->gl_vtable;
-   guint temp;
- 
--  GLfloat verts[] = { -1.0, -1.0,
--    1.0, -1.0,
--    1.0, 1.0,
--    -1.0, 1.0
--  };
--  GLfloat texcoords0[] = { 0.0f, 0.0f,
--    1.0f, 0.0f,
--    1.0f, 1.0f,
--    0.0f, 1.0f
--  };
--  GLfloat texcoords1[] = { 0.0f, 0.0f,
--    1.0f, 0.0f,
--    1.0f, 1.0f,
--    0.0f, 1.0f
--  };
-+  shader =
-+      gst_gl_deinterlace_get_fragment_shader (deinterlace_filter, "greedhy",
-+      greedyh_fragment_source);
- 
--  gl->MatrixMode (GL_PROJECTION);
--  gl->LoadIdentity ();
-+  if (!shader)
-+    return;
- 
--  gst_gl_shader_use (deinterlace_filter->shader);
-+#if GST_GL_HAVE_OPENGL
-+  if (USING_OPENGL (context)) {
-+    gl->MatrixMode (GL_PROJECTION);
-+    gl->LoadIdentity ();
-+  }
-+#endif
-+
-+  gst_gl_shader_use (shader);
- 
-   if (G_UNLIKELY (deinterlace_filter->prev_tex == 0)) {
-     gst_gl_context_gen_texture (GST_GL_BASE_FILTER (filter)->context,
-@@ -298,44 +496,24 @@ gst_gl_deinterlace_callback (gint width, gint height, guint texture,
-         GST_VIDEO_INFO_HEIGHT (&filter->out_info));
-   } else {
-     gl->ActiveTexture (GL_TEXTURE1);
--    gst_gl_shader_set_uniform_1i (deinterlace_filter->shader, "tex_prev", 1);
-+    gst_gl_shader_set_uniform_1i (shader, "tex_prev", 1);
-     gl->BindTexture (GL_TEXTURE_2D, deinterlace_filter->prev_tex);
-   }
- 
-   gl->ActiveTexture (GL_TEXTURE0);
--  gst_gl_shader_set_uniform_1i (deinterlace_filter->shader, "tex", 0);
-+  gl->BindTexture (GL_TEXTURE_2D, texture);
- 
--  gst_gl_shader_set_uniform_1f (deinterlace_filter->shader, "max_comb",
--      5.0f / 255.0f);
--  gst_gl_shader_set_uniform_1f (deinterlace_filter->shader, "motion_threshold",
--      25.0f / 255.0f);
--  gst_gl_shader_set_uniform_1f (deinterlace_filter->shader, "motion_sense",
--      30.0f / 255.0f);
-+  gst_gl_shader_set_uniform_1i (shader, "tex", 0);
-+  gst_gl_shader_set_uniform_1f (shader, "max_comb", 5.0f / 255.0f);
-+  gst_gl_shader_set_uniform_1f (shader, "motion_threshold", 25.0f / 255.0f);
-+  gst_gl_shader_set_uniform_1f (shader, "motion_sense", 30.0f / 255.0f);
- 
--  gst_gl_shader_set_uniform_1f (deinterlace_filter->shader, "width",
-+  gst_gl_shader_set_uniform_1f (shader, "width",
-       GST_VIDEO_INFO_WIDTH (&filter->out_info));
--  gst_gl_shader_set_uniform_1f (deinterlace_filter->shader, "height",
-+  gst_gl_shader_set_uniform_1f (shader, "height",
-       GST_VIDEO_INFO_HEIGHT (&filter->out_info));
- 
--  gl->ClientActiveTexture (GL_TEXTURE0);
--
--  gl->EnableClientState (GL_TEXTURE_COORD_ARRAY);
--  gl->EnableClientState (GL_VERTEX_ARRAY);
--
--  gl->VertexPointer (2, GL_FLOAT, 0, &verts);
--  gl->TexCoordPointer (2, GL_FLOAT, 0, &texcoords0);
--
--  gl->ClientActiveTexture (GL_TEXTURE1);
--  gl->EnableClientState (GL_TEXTURE_COORD_ARRAY);
--  gl->TexCoordPointer (2, GL_FLOAT, 0, &texcoords1);
--
--  gl->DrawArrays (GL_TRIANGLE_FAN, 0, 4);
--
--  gl->DisableClientState (GL_VERTEX_ARRAY);
--  gl->DisableClientState (GL_TEXTURE_COORD_ARRAY);
--
--  gl->ClientActiveTexture (GL_TEXTURE0);
--  gl->DisableClientState (GL_TEXTURE_COORD_ARRAY);
-+  gst_gl_filter_draw_texture (filter, texture, width, height);
- 
-   if (texture == filter->in_tex_id) {
-     temp = filter->in_tex_id;
-diff --git a/ext/gl/gstgldeinterlace.h b/ext/gl/gstgldeinterlace.h
-index a81a2e7..58a9c0c 100644
---- a/ext/gl/gstgldeinterlace.h
-+++ b/ext/gl/gstgldeinterlace.h
-@@ -38,9 +38,13 @@ typedef struct _GstGLDeinterlaceClass GstGLDeinterlaceClass;
- struct _GstGLDeinterlace
- {
-   GstGLFilter  filter;
--  GstGLShader  *shader;
-+
-+  GLCB	       deinterlacefunc; 
-+  GHashTable   *shaderstable;
-   GstBuffer    *prev_buffer;
-   guint         prev_tex;
-+
-+  gint	       current_method;
- };
- 
- struct _GstGLDeinterlaceClass
-diff --git a/ext/gl/gstopengl.c b/ext/gl/gstopengl.c
-index 50676c4..135862a 100644
---- a/ext/gl/gstopengl.c
-+++ b/ext/gl/gstopengl.c
-@@ -62,6 +62,7 @@
- #include "gstglstereosplit.h"
- #include "gstglstereomix.h"
- #include "gstglviewconvert.h"
-+#include "gstgldeinterlace.h"
- 
- #if HAVE_GRAPHENE
- #include "gstgltransformation.h"
-@@ -77,7 +78,6 @@
- #include "gstgltestsrc.h"
- #include "gstglfilterglass.h"
- /* #include "gstglfilterreflectedscreen.h" */
--#include "gstgldeinterlace.h"
- #include "gstglmosaic.h"
- #if HAVE_PNG
- #include "gstgldifferencematte.h"
-@@ -226,6 +226,12 @@ plugin_init (GstPlugin * plugin)
-           GST_RANK_NONE, GST_TYPE_GL_STEREO_MIX)) {
-     return FALSE;
-   }
-+
-+  if (!gst_element_register (plugin, "gldeinterlace",
-+          GST_RANK_NONE, GST_TYPE_GL_DEINTERLACE)) {
-+    return FALSE;
-+  }
-+
- #if HAVE_JPEG
- #if HAVE_PNG
-   if (!gst_element_register (plugin, "gloverlay",
-@@ -250,11 +256,6 @@ plugin_init (GstPlugin * plugin)
-     return FALSE;
-   }
- #endif
--  if (!gst_element_register (plugin, "gldeinterlace",
--          GST_RANK_NONE, GST_TYPE_GL_DEINTERLACE)) {
--    return FALSE;
--  }
--
-   if (!gst_element_register (plugin, "glmosaic",
-           GST_RANK_NONE, GST_TYPE_GL_MOSAIC)) {
-     return FALSE;
--- 
-1.9.1
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-glcolorconvert-implement-multiple-render-targets-for.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-glcolorconvert-implement-multiple-render-targets-for.patch
deleted file mode 100755
index 31d8e05..0000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-glcolorconvert-implement-multiple-render-targets-for.patch
+++ /dev/null
@@ -1,244 +0,0 @@
-From 127e517568490fc147211d8b2fb4da01cecbbeb5 Mon Sep 17 00:00:00 2001
-From: Matthew Waters <matthew@centricular.com>
-Date: Thu, 31 Mar 2016 19:50:28 +1100
-Subject: [PATCH 5/6] glcolorconvert: implement multiple render targets for
- GLES3
-
-There are numerous slight differences required between Desktop GL and GLES3 for
-multiple render targets.
-
-1. gl_FragData doesn't exist at all and one is required to use
-   'layout (location = ?) out ...' instead.
-2. gl_FragColor doesn't exist, same as 1
-3. texture2D() has been deprecated
-
-Fortunately most of these have been taken care of with GL3 and the shader
-mangling already exists so just expand the conditions they are used in.  The
-gl_FragData issue requires a new mangle pass though.  We also use this new
-pass on desktop GL for consistency.
-
-Upstream-Status: Backport [1.9.1]
-
----
- gst-libs/gst/gl/gstglcolorconvert.c | 125 ++++++++++++++++++++++++++++--------
- 1 file changed, 99 insertions(+), 26 deletions(-)
-
-diff --git a/gst-libs/gst/gl/gstglcolorconvert.c b/gst-libs/gst/gl/gstglcolorconvert.c
-index 490ec54..f478faa 100644
---- a/gst-libs/gst/gl/gstglcolorconvert.c
-+++ b/gst-libs/gst/gl/gstglcolorconvert.c
-@@ -1802,10 +1802,11 @@ _mangle_sampler_type (const gchar * str, GstGLTextureTarget from,
- 
- static gchar *
- _mangle_varying_attribute (const gchar * str, guint shader_type,
--    GstGLAPI gl_api)
-+    GstGLAPI gl_api, guint gl_major, guint gl_minor)
- {
--  if (gl_api & GST_GL_API_OPENGL3) {
--    if (shader_type == GL_VERTEX_SHADER) {
-+  if (shader_type == GL_VERTEX_SHADER) {
-+    if ((gl_api & GST_GL_API_OPENGL3) || (gl_api & GST_GL_API_GLES2
-+            && gl_major >= 3)) {
-       gchar *tmp, *tmp2;
-       GRegex *regex;
- 
-@@ -1821,7 +1822,10 @@ _mangle_varying_attribute (const gchar * str, guint shader_type,
- 
-       g_free (tmp);
-       return tmp2;
--    } else if (shader_type == GL_FRAGMENT_SHADER) {
-+    }
-+  } else if (shader_type == GL_FRAGMENT_SHADER) {
-+    if ((gl_api & GST_GL_API_OPENGL3) || (gl_api & GST_GL_API_GLES2
-+            && gl_major > 3)) {
-       gchar *tmp;
-       GRegex *regex;
- 
-@@ -1837,28 +1841,48 @@ _mangle_varying_attribute (const gchar * str, guint shader_type,
- }
- 
- static gchar *
--_mangle_frag_color (const gchar * str)
-+_mangle_frag_color_data (const gchar * str)
- {
-   GRegex *regex;
--  gchar *ret;
-+  gchar *ret, *tmp;
- 
-   regex = g_regex_new ("gl_FragColor", 0, 0, NULL);
-   ret = g_regex_replace_literal (regex, str, -1, 0, "fragColor", 0, NULL);
-   g_regex_unref (regex);
- 
-+  tmp = ret;
-+  /* search and replace 'gl_FragData[NUM]' into fragColor_NUM */
-+  regex = g_regex_new ("gl_FragData\\[(\\d+)\\]", 0, 0, NULL);
-+  ret = g_regex_replace (regex, tmp, -1, 0, "fragColor_\\1", 0, NULL);
-+  g_regex_unref (regex);
-+  g_free (tmp);
-+
-   return ret;
- }
- 
- static void
--_mangle_version_profile_from_gl_api (GstGLAPI gl_api, GstGLSLVersion * version,
--    GstGLSLProfile * profile)
-+_mangle_version_profile_from_gl_api (GstGLAPI gl_api, gint gl_major,
-+    gint gl_minor, GstGLSLVersion * version, GstGLSLProfile * profile)
- {
-+  *version = GST_GLSL_VERSION_NONE;
-+  *profile = GST_GLSL_PROFILE_NONE;
-+
-   if (gl_api & GST_GL_API_OPENGL3) {
--    *version = GST_GLSL_VERSION_150;
--    *profile = GST_GLSL_PROFILE_NONE;
-+    if (gl_major > 3 || gl_minor >= 3) {
-+      *version = GST_GLSL_VERSION_330;
-+      *profile = GST_GLSL_PROFILE_CORE;
-+    } else {
-+      *version = GST_GLSL_VERSION_150;
-+      *profile = GST_GLSL_PROFILE_NONE;
-+    }
-   } else if (gl_api & GST_GL_API_GLES2) {
--    *version = GST_GLSL_VERSION_100;
--    *profile = GST_GLSL_PROFILE_ES;
-+    if (gl_major >= 3) {
-+      *version = GST_GLSL_VERSION_300;
-+      *profile = GST_GLSL_PROFILE_ES;
-+    } else if (gl_major >= 2) {
-+      *version = GST_GLSL_VERSION_100;
-+      *profile = GST_GLSL_PROFILE_ES;
-+    }
-   } else if (gl_api & GST_GL_API_OPENGL) {
-     *version = GST_GLSL_VERSION_110;
-     *profile = GST_GLSL_PROFILE_COMPATIBILITY;
-@@ -1867,22 +1891,28 @@ _mangle_version_profile_from_gl_api (GstGLAPI gl_api, GstGLSLVersion * version,
- 
- static gchar *
- _mangle_shader (const gchar * str, guint shader_type, GstGLTextureTarget from,
--    GstGLTextureTarget to, GstGLAPI gl_api, GstGLSLVersion * version,
--    GstGLSLProfile * profile)
-+    GstGLTextureTarget to, GstGLAPI gl_api, gint gl_major, gint gl_minor,
-+    GstGLSLVersion * version, GstGLSLProfile * profile)
- {
-   gchar *tmp, *tmp2;
- 
-+  _mangle_version_profile_from_gl_api (gl_api, gl_major, gl_minor, version,
-+      profile);
-   tmp = _mangle_texture_access (str, from, to, gl_api);
-   tmp2 = _mangle_sampler_type (tmp, from, to);
-   g_free (tmp);
--  tmp = _mangle_varying_attribute (tmp2, shader_type, gl_api);
-+  tmp =
-+      _mangle_varying_attribute (tmp2, shader_type, gl_api, gl_major, gl_minor);
-   g_free (tmp2);
--  if (shader_type == GL_FRAGMENT_SHADER && gl_api & GST_GL_API_OPENGL3) {
--    tmp2 = _mangle_frag_color (tmp);
--    g_free (tmp);
--    tmp = tmp2;
-+  if (shader_type == GL_FRAGMENT_SHADER) {
-+    if ((*profile == GST_GLSL_PROFILE_ES && *version >= GST_GLSL_VERSION_300)
-+        || (*profile == GST_GLSL_PROFILE_CORE
-+            && *version >= GST_GLSL_VERSION_150)) {
-+      tmp2 = _mangle_frag_color_data (tmp);
-+      g_free (tmp);
-+      tmp = tmp2;
-+    }
-   }
--  _mangle_version_profile_from_gl_api (gl_api, version, profile);
-   return tmp;
- }
- 
-@@ -1899,15 +1929,18 @@ _create_shader (GstGLColorConvert * convert)
-   const gchar *strings[2];
-   GError *error = NULL;
-   GstGLAPI gl_api;
-+  gint gl_major, gl_minor;
-   int i;
- 
-   gl_api = gst_gl_context_get_gl_api (convert->context);
-+  gst_gl_context_get_gl_version (convert->context, &gl_major, &gl_minor);
- 
-   ret = gst_gl_shader_new (convert->context);
- 
-   tmp =
-       _mangle_shader (text_vertex_shader, GL_VERTEX_SHADER, info->templ->target,
--      convert->priv->from_texture_target, gl_api, &version, &profile);
-+      convert->priv->from_texture_target, gl_api, gl_major, gl_minor, &version,
-+      &profile);
- 
-   tmp1 = gst_glsl_version_profile_to_string (version, profile);
-   version_str = g_strdup_printf ("#version %s\n", tmp1);
-@@ -1945,9 +1978,37 @@ _create_shader (GstGLColorConvert * convert)
-   if (info->templ->uniforms)
-     g_string_append (str, info->templ->uniforms);
- 
--  if (gl_api & GST_GL_API_OPENGL3) {
--    g_string_append_c (str, '\n');
--    g_string_append (str, "out vec4 fragColor;\n");
-+  g_string_append_c (str, '\n');
-+
-+  /* GL 3.3+ and GL ES 3.x */
-+  if ((profile == GST_GLSL_PROFILE_CORE && version >= GST_GLSL_VERSION_330)
-+      || (profile == GST_GLSL_PROFILE_ES && version >= GST_GLSL_VERSION_300)) {
-+    if (info->out_n_textures > 1) {
-+      gint i;
-+
-+      for (i = 0; i < info->out_n_textures; i++) {
-+        g_string_append_printf (str,
-+            "layout(location = %d) out vec4 fragColor_%d;\n", i, i);
-+      }
-+    } else {
-+      g_string_append (str, "layout (location = 0) out vec4 fragColor;\n");
-+    }
-+  } else if (profile == GST_GLSL_PROFILE_CORE
-+      && version >= GST_GLSL_VERSION_150) {
-+    /* no layout specifiers, use glBindFragDataLocation instead */
-+    if (info->out_n_textures > 1) {
-+      gint i;
-+
-+      for (i = 0; i < info->out_n_textures; i++) {
-+        gchar *var_name = g_strdup_printf ("fragColor_%d", i);
-+        g_string_append_printf (str, "out vec4 %s;\n", var_name);
-+        gst_gl_shader_bind_frag_data_location (ret, i, var_name);
-+        g_free (var_name);
-+      }
-+    } else {
-+      g_string_append (str, "out vec4 fragColor;\n");
-+      gst_gl_shader_bind_frag_data_location (ret, 0, "fragColor");
-+    }
-   }
- 
-   for (i = 0; i < MAX_FUNCTIONS; i++) {
-@@ -1959,7 +2020,19 @@ _create_shader (GstGLColorConvert * convert)
-     g_string_append_c (str, '\n');
-   }
- 
--  g_string_append (str, "\nvarying vec2 v_texcoord;\nvoid main (void) {\n");
-+  {
-+    const gchar *varying = NULL;
-+
-+    if ((profile == GST_GLSL_PROFILE_ES && version >= GST_GLSL_VERSION_300)
-+        || (profile == GST_GLSL_PROFILE_CORE
-+            && version >= GST_GLSL_VERSION_150)) {
-+      varying = "in";
-+    } else {
-+      varying = "varying";
-+    }
-+    g_string_append_printf (str, "\n%s vec2 v_texcoord;\nvoid main (void) {\n",
-+        varying);
-+  }
-   if (info->frag_body) {
-     g_string_append (str, "vec2 texcoord;\n");
-     if (convert->priv->from_texture_target == GST_GL_TEXTURE_TARGET_RECTANGLE
-@@ -1975,7 +2048,7 @@ _create_shader (GstGLColorConvert * convert)
-   tmp = g_string_free (str, FALSE);
-   info->frag_prog = _mangle_shader (tmp, GL_FRAGMENT_SHADER,
-       info->templ->target, convert->priv->from_texture_target, gl_api,
--      &version, &profile);
-+      gl_major, gl_minor, &version, &profile);
-   g_free (tmp);
- 
-   strings[1] = info->frag_prog;
--- 
-1.9.1
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch
deleted file mode 100755
index b75f402..0000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From b069672ace2b762f400ca6d318571cbedf5141f2 Mon Sep 17 00:00:00 2001
-From: Matthew Waters <matthew@centricular.com>
-Date: Thu, 31 Mar 2016 20:00:37 +1100
-Subject: [PATCH 1/3] glcolorconvert: don't use the predefined variable name
- sample
-
-Using 'sample' as a variable name is an error in GLES3
-
-Upstream-Status: Backport [1.9.1]
----
- gst-libs/gst/gl/gstglcolorconvert.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gst-libs/gst/gl/gstglcolorconvert.c b/gst-libs/gst/gl/gstglcolorconvert.c
-index f478faa..c23624f 100644
---- a/gst-libs/gst/gl/gstglcolorconvert.c
-+++ b/gst-libs/gst/gl/gstglcolorconvert.c
-@@ -261,9 +261,9 @@ static const struct shader_templ templ_RGB_to_PLANAR_YUV =
-     "    for (int j = 0; j < int(chroma_sampling.y); j++) {\n"
-     "      int n = (i+1)*(j+1);\n"
-     "      delta.y = float(j);\n"
--    "      vec4 sample = texture2D(tex, (chroma_pos + delta) / unnormalization).%c%c%c%c;\n"
-+    "      vec4 s = texture2D(tex, (chroma_pos + delta) / unnormalization).%c%c%c%c;\n"
-            /* rolling average */
--    "      uv_texel = (float(n-1) * uv_texel + sample) / float(n);\n"
-+    "      uv_texel = (float(n-1) * uv_texel + s) / float(n);\n"
-     "    }\n"
-     "  }\n"
-     "}\n"
--- 
-1.9.1
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glshader-add-glBindFragDataLocation.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glshader-add-glBindFragDataLocation.patch
deleted file mode 100755
index 57e9d1a..0000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glshader-add-glBindFragDataLocation.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From 38221080181229d520522a20bcb1663ca19f7aff Mon Sep 17 00:00:00 2001
-From: Matthew Waters <matthew@centricular.com>
-Date: Thu, 31 Mar 2016 19:25:32 +1100
-Subject: [PATCH 2/3] glshader: add glBindFragDataLocation
-
-There are some cases where it's needed for binding in/out variables in shaders.
-e.g. glsl 150 (gl 3.2) doesn't support the 'layout (location = ?)' specifiers in
-the shader source so we have to bind them ourselves.
-
-Upstream-Status: Backport [1.9.1]
----
- gst-libs/gst/gl/glprototypes/shaders.h | 10 ++++++++++
- gst-libs/gst/gl/gstglshader.c          | 20 ++++++++++++++++++++
- gst-libs/gst/gl/gstglshader.h          |  1 +
- 3 files changed, 31 insertions(+)
-
-diff --git a/gst-libs/gst/gl/glprototypes/shaders.h b/gst-libs/gst/gl/glprototypes/shaders.h
-index 817e479..6d828db 100644
---- a/gst-libs/gst/gl/glprototypes/shaders.h
-+++ b/gst-libs/gst/gl/glprototypes/shaders.h
-@@ -362,3 +362,13 @@ GST_GL_EXT_FUNCTION (void, UniformMatrix3x4fv,
- GST_GL_EXT_FUNCTION (void, UniformMatrix4x3fv,
-                      (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value))
- GST_GL_EXT_END ()
-+
-+GST_GL_EXT_BEGIN (bind_frag_data,
-+                  GST_GL_API_OPENGL | GST_GL_API_OPENGL3,
-+                  3, 0,
-+                  255, 255,
-+                  "\0",
-+                  "\0")
-+GST_GL_EXT_FUNCTION (void, BindFragDataLocation,
-+                     (GLuint program, GLuint index, const GLchar * name))
-+GST_GL_EXT_END ()
-diff --git a/gst-libs/gst/gl/gstglshader.c b/gst-libs/gst/gl/gstglshader.c
-index 9d96784..9f09236 100644
---- a/gst-libs/gst/gl/gstglshader.c
-+++ b/gst-libs/gst/gl/gstglshader.c
-@@ -1306,3 +1306,23 @@ gst_gl_shader_bind_attribute_location (GstGLShader * shader, GLuint index,
- 
-   gl->BindAttribLocation (priv->program_handle, index, name);
- }
-+
-+void
-+gst_gl_shader_bind_frag_data_location (GstGLShader * shader,
-+    guint index, const gchar * name)
-+{
-+  GstGLShaderPrivate *priv;
-+  GstGLFuncs *gl;
-+
-+  g_return_if_fail (shader != NULL);
-+  if (!_ensure_program (shader))
-+    g_return_if_fail (shader->priv->program_handle);
-+  priv = shader->priv;
-+  gl = shader->context->gl_vtable;
-+  g_return_if_fail (gl->BindFragDataLocation);
-+
-+  GST_TRACE_OBJECT (shader, "binding program %i frag data \'%s\' location %i",
-+      (int) priv->program_handle, name, index);
-+
-+  gl->BindFragDataLocation (priv->program_handle, index, name);
-+}
-diff --git a/gst-libs/gst/gl/gstglshader.h b/gst-libs/gst/gl/gstglshader.h
-index 21410e2..2200b89 100644
---- a/gst-libs/gst/gl/gstglshader.h
-+++ b/gst-libs/gst/gl/gstglshader.h
-@@ -104,6 +104,7 @@ void gst_gl_shader_set_uniform_matrix_4x3fv (GstGLShader *shader, const gchar *n
- 
- gint gst_gl_shader_get_attribute_location  (GstGLShader *shader, const gchar *name);
- void gst_gl_shader_bind_attribute_location (GstGLShader * shader, guint index, const gchar * name);
-+void gst_gl_shader_bind_frag_data_location (GstGLShader * shader, guint index, const gchar * name);
- 
- G_END_DECLS
- 
--- 
-1.9.1
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-glcolorconvert-GLES3-deprecates-texture2D-and-it-doe.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-glcolorconvert-GLES3-deprecates-texture2D-and-it-doe.patch
deleted file mode 100755
index 79ef4c8..0000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-glcolorconvert-GLES3-deprecates-texture2D-and-it-doe.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 764fd69f8482eca9f925cefe72ebae090ae59d43 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
-Date: Tue, 19 Apr 2016 19:27:33 +0300
-Subject: [PATCH 3/3] glcolorconvert: GLES3 deprecates texture2D() and it does
- not work at all in newer versions than 3.3
-
-Use the newer texture() function instead. This fixes glimagesink and other
-things on various Android devices.
-
-Upstream-Status: Backport [1.9.1]
-
-https://bugzilla.gnome.org/show_bug.cgi?id=765266
----
- gst-libs/gst/gl/gstglcolorconvert.c | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/gst-libs/gst/gl/gstglcolorconvert.c b/gst-libs/gst/gl/gstglcolorconvert.c
-index c23624f..f472d5d 100644
---- a/gst-libs/gst/gl/gstglcolorconvert.c
-+++ b/gst-libs/gst/gl/gstglcolorconvert.c
-@@ -1716,7 +1716,7 @@ _unbind_buffer (GstGLColorConvert * convert)
- 
- static gchar *
- _mangle_texture_access (const gchar * str, GstGLTextureTarget from,
--    GstGLTextureTarget to, GstGLAPI gl_api)
-+    GstGLTextureTarget to, GstGLAPI gl_api, guint gl_major, guint gl_minor)
- {
-   const gchar *from_str = NULL, *to_str = NULL;
-   gchar *ret, *tmp;
-@@ -1730,7 +1730,8 @@ _mangle_texture_access (const gchar * str, GstGLTextureTarget from,
-   if (from == GST_GL_TEXTURE_TARGET_EXTERNAL_OES)
-     from_str = "texture2D";
- 
--  if (gl_api & GST_GL_API_OPENGL3) {
-+  if ((gl_api & GST_GL_API_OPENGL3) || (gl_api & GST_GL_API_GLES2
-+          && gl_major >= 3)) {
-     to_str = "texture";
-   } else {
-     if (to == GST_GL_TEXTURE_TARGET_2D)
-@@ -1898,7 +1899,7 @@ _mangle_shader (const gchar * str, guint shader_type, GstGLTextureTarget from,
- 
-   _mangle_version_profile_from_gl_api (gl_api, gl_major, gl_minor, version,
-       profile);
--  tmp = _mangle_texture_access (str, from, to, gl_api);
-+  tmp = _mangle_texture_access (str, from, to, gl_api, gl_major, gl_minor);
-   tmp2 = _mangle_sampler_type (tmp, from, to);
-   g_free (tmp);
-   tmp =
--- 
-1.9.1
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-gl-implement-GstGLMemoryEGL.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-gl-implement-GstGLMemoryEGL.patch
deleted file mode 100644
index a67381c..0000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-gl-implement-GstGLMemoryEGL.patch
+++ /dev/null
@@ -1,495 +0,0 @@
-From 806bbe75b0b6947f589bce3960c28fee51b5c6c2 Mon Sep 17 00:00:00 2001
-From: Gwang Yoon Hwang <yoon@igalia.com>
-Date: Thu, 21 Jan 2016 22:18:17 +0900
-Subject: [PATCH] gl: implement GstGLMemoryEGL
-
-Because current GstEGLImageMemory does not inherit GstGLMemory, GLUpload
-allocates additional GLMemory and upload the decoded contents from the decoder
-which uses EGLImage (e.g. gst-omx in RPi).
-
-This work adds GstGLMemoryEGL to avoid this overhead. Decoders allocate
-GstGLMemoryEGL and decode its contents to the EGLImage of GstGLMemoryEGL.  And
-GLUpload uses this memory without allocation of additional textures and blit
-operations.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=760916
----
-Upstream-Status: Backport
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
- gst-libs/gst/gl/egl/Makefile.am        |   2 +
- gst-libs/gst/gl/egl/gstgldisplay_egl.c |   2 +
- gst-libs/gst/gl/egl/gstglmemoryegl.c   | 241 +++++++++++++++++++++++++++++++++
- gst-libs/gst/gl/egl/gstglmemoryegl.h   | 108 +++++++++++++++
- gst-libs/gst/gl/gstgl_fwd.h            |   4 +
- gst-libs/gst/gl/gstgldisplay.c         |   2 +
- gst-libs/gst/gl/gstglupload.c          |   8 ++
- 7 files changed, 367 insertions(+)
- create mode 100644 gst-libs/gst/gl/egl/gstglmemoryegl.c
- create mode 100644 gst-libs/gst/gl/egl/gstglmemoryegl.h
-
-diff --git a/gst-libs/gst/gl/egl/Makefile.am b/gst-libs/gst/gl/egl/Makefile.am
-index b808178..878f16c 100644
---- a/gst-libs/gst/gl/egl/Makefile.am
-+++ b/gst-libs/gst/gl/egl/Makefile.am
-@@ -5,6 +5,7 @@ noinst_LTLIBRARIES = libgstgl-egl.la
- libgstgl_egl_la_SOURCES = \
- 	gstgldisplay_egl.c \
- 	gstglcontext_egl.c \
-+	gstglmemoryegl.c \
- 	gsteglimagememory.c
- 
- noinst_HEADERS =
-@@ -13,6 +14,7 @@ libgstgl_eglincludedir = $(includedir)/gstreamer-@GST_API_VERSION@/gst/gl/egl
- libgstgl_eglinclude_HEADERS = \
- 	gstgldisplay_egl.h \
- 	gstglcontext_egl.h \
-+	gstglmemoryegl.h \
- 	gsteglimagememory.h \
- 	gstegl.h
- 
-diff --git a/gst-libs/gst/gl/egl/gstgldisplay_egl.c b/gst-libs/gst/gl/egl/gstgldisplay_egl.c
-index 9acf4f0..20816c2 100644
---- a/gst-libs/gst/gl/egl/gstgldisplay_egl.c
-+++ b/gst-libs/gst/gl/egl/gstgldisplay_egl.c
-@@ -24,6 +24,7 @@
- 
- #include <gst/gl/egl/gstgldisplay_egl.h>
- #include <gst/gl/egl/gsteglimagememory.h>
-+#include <gst/gl/egl/gstglmemoryegl.h>
- 
- GST_DEBUG_CATEGORY_STATIC (gst_gl_display_debug);
- #define GST_CAT_DEFAULT gst_gl_display_debug
-@@ -51,6 +52,7 @@ gst_gl_display_egl_init (GstGLDisplayEGL * display_egl)
-   display_egl->foreign_display = FALSE;
- 
-   gst_egl_image_memory_init ();
-+  gst_gl_memory_egl_init_once ();
- }
- 
- static void
-diff --git a/gst-libs/gst/gl/egl/gstglmemoryegl.c b/gst-libs/gst/gl/egl/gstglmemoryegl.c
-new file mode 100644
-index 0000000..03cf432
---- /dev/null
-+++ b/gst-libs/gst/gl/egl/gstglmemoryegl.c
-@@ -0,0 +1,241 @@
-+/*
-+ * GStreamer
-+ * Copyright (C) 2012 Collabora Ltd.
-+ *   @author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
-+ * Copyright (C) 2014 Julien Isorce <julien.isorce@gmail.com>
-+ * Copyright (C) 2015 Igalia
-+ *    Author: Gwang Yoon Hwang <yoon@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 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; if not, write to the
-+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
-+ * Boston, MA 02110-1301, USA.
-+ */
-+
-+#ifdef HAVE_CONFIG_H
-+#include "config.h"
-+#endif
-+
-+#include <string.h>
-+
-+#include <gst/gl/egl/gstglmemoryegl.h>
-+
-+static GstAllocator *_gl_memory_egl_allocator;
-+
-+GST_DEBUG_CATEGORY_STATIC (GST_CAT_GL_MEMORY);
-+#define GST_CAT_DEFAULT GST_CAT_GL_MEMORY
-+
-+#define parent_class gst_gl_memory_egl_allocator_parent_class
-+G_DEFINE_TYPE (GstGLMemoryEGLAllocator, gst_gl_memory_egl_allocator,
-+    GST_TYPE_GL_MEMORY_ALLOCATOR);
-+
-+gboolean
-+gst_is_gl_memory_egl (GstMemory * mem)
-+{
-+  return mem != NULL && mem->allocator != NULL
-+      && g_type_is_a (G_OBJECT_TYPE (mem->allocator),
-+      GST_TYPE_GL_MEMORY_EGL_ALLOCATOR);
-+}
-+
-+static GstGLMemoryEGL *
-+_gl_mem_get_parent (GstGLMemoryEGL * gl_mem)
-+{
-+  GstGLMemoryEGL *parent = (GstGLMemoryEGL *)gl_mem->mem.mem.mem.parent;
-+  return parent ? parent : gl_mem;
-+}
-+
-+EGLImageKHR
-+gst_gl_memory_egl_get_image (GstGLMemoryEGL * mem)
-+{
-+  g_return_val_if_fail (gst_is_gl_memory_egl (GST_MEMORY_CAST (mem)),
-+                        EGL_NO_IMAGE_KHR);
-+  return _gl_mem_get_parent(mem)->image;
-+}
-+
-+EGLDisplay
-+gst_gl_memory_egl_get_display (GstGLMemoryEGL * mem)
-+{
-+  g_return_val_if_fail (gst_is_gl_memory_egl (GST_MEMORY_CAST (mem)), NULL);
-+  return GST_GL_CONTEXT_EGL(_gl_mem_get_parent(mem))->egl_display;
-+}
-+
-+GstVideoGLTextureOrientation
-+gst_gl_memory_egl_get_orientation (GstGLMemoryEGL * mem)
-+{
-+  g_return_val_if_fail (gst_is_gl_memory_egl (GST_MEMORY_CAST (mem)),
-+      GST_VIDEO_GL_TEXTURE_ORIENTATION_X_NORMAL_Y_NORMAL);
-+
-+  return _gl_mem_get_parent(mem)->orientation;
-+}
-+
-+void
-+gst_gl_memory_egl_set_orientation (GstGLMemoryEGL * mem,
-+    GstVideoGLTextureOrientation orientation)
-+{
-+  g_return_if_fail (gst_is_gl_memory_egl (GST_MEMORY_CAST (mem)));
-+
-+  _gl_mem_get_parent(mem)->orientation = orientation;
-+}
-+
-+static GstMemory *
-+_gl_mem_alloc (GstAllocator * allocator, gsize size,
-+               GstAllocationParams * params)
-+{
-+  g_warning ("Use gst_gl_base_memory_allocator_alloc() to allocate from this "
-+      "GstGLMemoryEGL allocator");
-+
-+  return NULL;
-+}
-+
-+static void
-+_gl_mem_destroy (GstGLMemoryEGL * mem)
-+{
-+  /* Shared memory should not destroy all the data */
-+  if (!mem->mem.mem.mem.parent) {
-+    GstGLContextEGL *context = GST_GL_CONTEXT_EGL(mem->mem.mem.context);
-+    context->eglDestroyImage (context->egl_display, mem->image);
-+  }
-+
-+  GST_GL_BASE_MEMORY_ALLOCATOR_CLASS (parent_class)->destroy ((GstGLBaseMemory
-+          *) mem);
-+}
-+
-+static void
-+_gl_mem_init (GstGLMemoryEGL * mem, GstAllocator * allocator,
-+    GstMemory * parent, GstGLContext * context, GstGLTextureTarget target,
-+    GstAllocationParams * params, GstVideoInfo * info,
-+    guint plane, GstVideoAlignment * valign, gpointer user_data,
-+    GDestroyNotify notify)
-+{
-+  gst_gl_memory_init ((GstGLMemory *) mem, allocator, parent,
-+      context, target, params, info, plane, valign, user_data, notify);
-+}
-+
-+static GstGLMemoryEGL *
-+_gl_mem_egl_alloc (GstGLBaseMemoryAllocator * allocator,
-+    GstGLVideoAllocationParams * params)
-+{
-+  guint alloc_flags = params->parent.alloc_flags;
-+  GstGLMemoryEGL *mem;
-+
-+  g_return_val_if_fail (alloc_flags & GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_VIDEO,
-+      NULL);
-+  g_return_val_if_fail ((alloc_flags &
-+      GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_WRAP_GPU_HANDLE) == 0, NULL);
-+  g_return_val_if_fail ((alloc_flags &
-+      GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_WRAP_SYSMEM) == 0, NULL);
-+
-+  mem = g_new0 (GstGLMemoryEGL, 1);
-+  mem->image = EGL_NO_IMAGE_KHR;
-+
-+  _gl_mem_init (mem, GST_ALLOCATOR_CAST (allocator), NULL,
-+      params->parent.context, params->target, params->parent.alloc_params,
-+      params->v_info, params->plane, params->valign, params->parent.user_data,
-+      params->parent.notify);
-+
-+  return mem;
-+}
-+
-+static gboolean
-+_gl_mem_create (GstGLMemoryEGL * gl_mem, GError ** error)
-+{
-+  GstGLContextEGL *context = GST_GL_CONTEXT_EGL (gl_mem->mem.mem.context);
-+  GstGLBaseMemoryAllocatorClass *alloc_class;
-+
-+  if (!gst_gl_context_check_feature (GST_GL_CONTEXT (context),
-+                                     "EGL_KHR_image_base")) {
-+    g_set_error (error, GST_GL_CONTEXT_ERROR, GST_GL_CONTEXT_ERROR_WRONG_API,
-+                 "EGL_KHR_image_base is not supported");
-+    return FALSE;
-+  }
-+
-+  alloc_class = GST_GL_BASE_MEMORY_ALLOCATOR_CLASS (parent_class);
-+  if (!alloc_class->create ((GstGLBaseMemory *) gl_mem, error))
-+    return FALSE;
-+
-+  gl_mem->image = context->eglCreateImage (context->egl_display,
-+      context->egl_context, EGL_GL_TEXTURE_2D_KHR,
-+      (EGLClientBuffer) GSIZE_TO_POINTER (gl_mem->mem.tex_id), NULL);
-+
-+  GST_TRACE ("Generating EGLImage handle:%p from a texture:%u",
-+              gl_mem->image, gl_mem->mem.tex_id);
-+
-+  if (eglGetError () != EGL_SUCCESS) {
-+    g_set_error (error, GST_GL_CONTEXT_ERROR, GST_GL_CONTEXT_ERROR_FAILED,
-+                 "Failed to create EGLImage");
-+    return FALSE;
-+  }
-+
-+  return TRUE;
-+}
-+
-+static GstMemory *
-+_gl_mem_copy (GstGLMemoryEGL * src, gssize offset, gssize size)
-+{
-+  GST_CAT_ERROR (GST_CAT_GL_MEMORY, "GstGLMemoryEGL does not support copy");
-+  return NULL;
-+}
-+
-+static void
-+gst_gl_memory_egl_allocator_class_init (GstGLMemoryEGLAllocatorClass * klass)
-+{
-+  GstGLBaseMemoryAllocatorClass *gl_base;
-+  GstGLMemoryAllocatorClass *gl_tex;
-+  GstAllocatorClass *allocator_class;
-+
-+  gl_tex = (GstGLMemoryAllocatorClass *) klass;
-+  gl_base = (GstGLBaseMemoryAllocatorClass *) klass;
-+  allocator_class = (GstAllocatorClass *) klass;
-+
-+  gl_base->alloc = (GstGLBaseMemoryAllocatorAllocFunction) _gl_mem_egl_alloc;
-+  gl_base->create = (GstGLBaseMemoryAllocatorCreateFunction) _gl_mem_create;
-+  gl_base->destroy = (GstGLBaseMemoryAllocatorDestroyFunction) _gl_mem_destroy;
-+  gl_tex->copy = (GstGLBaseMemoryAllocatorCopyFunction) _gl_mem_copy;
-+
-+  allocator_class->alloc = _gl_mem_alloc;
-+}
-+
-+static void
-+gst_gl_memory_egl_allocator_init (GstGLMemoryEGLAllocator * allocator)
-+{
-+  GstAllocator *alloc = GST_ALLOCATOR_CAST (allocator);
-+
-+  alloc->mem_type = GST_GL_MEMORY_EGL_ALLOCATOR_NAME;
-+
-+  GST_OBJECT_FLAG_SET (allocator, GST_ALLOCATOR_FLAG_CUSTOM_ALLOC);
-+}
-+
-+/**
-+ * gst_gl_memory_egl_init_once:
-+ *
-+ * Initializes the GL Memory allocator. It is safe to call this function
-+ * multiple times.  This must be called before any other GstGLMemoryEGL operation.
-+ */
-+void
-+gst_gl_memory_egl_init_once (void)
-+{
-+  static volatile gsize _init = 0;
-+
-+  if (g_once_init_enter (&_init)) {
-+    gst_gl_memory_init_once ();
-+
-+    GST_DEBUG_CATEGORY_INIT (GST_CAT_GL_MEMORY, "glmemory", 0,
-+        "OpenGL Texture with EGLImage memory");
-+
-+    _gl_memory_egl_allocator = g_object_new (GST_TYPE_GL_MEMORY_EGL_ALLOCATOR, NULL);
-+
-+    gst_allocator_register (GST_GL_MEMORY_EGL_ALLOCATOR_NAME,
-+        gst_object_ref (_gl_memory_egl_allocator));
-+    g_once_init_leave (&_init, 1);
-+  }
-+}
-diff --git a/gst-libs/gst/gl/egl/gstglmemoryegl.h b/gst-libs/gst/gl/egl/gstglmemoryegl.h
-new file mode 100644
-index 0000000..7256d33
---- /dev/null
-+++ b/gst-libs/gst/gl/egl/gstglmemoryegl.h
-@@ -0,0 +1,108 @@
-+/*
-+ * GStreamer
-+ * Copyright (C) 2012 Collabora Ltd.
-+ *   @author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
-+ * Copyright (C) 2014 Julien Isorce <julien.isorce@gmail.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 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; if not, write to the
-+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
-+ * Boston, MA 02110-1301, USA.
-+ */
-+
-+#ifndef _GST_GL_MEMORY_EGL_H_
-+#define _GST_GL_MEMORY_EGL_H_
-+
-+#include <gst/gst.h>
-+#include <gst/gstallocator.h>
-+#include <gst/gstmemory.h>
-+#include <gst/video/video.h>
-+
-+#include <gst/gl/gl.h>
-+#include "gstglcontext_egl.h"
-+
-+#include <gst/gl/gstglmemory.h>
-+
-+G_BEGIN_DECLS
-+
-+#define GST_TYPE_GL_MEMORY_EGL_ALLOCATOR (gst_gl_memory_egl_allocator_get_type())
-+GType gst_gl_memory_egl_allocator_get_type(void);
-+
-+#define GST_IS_GL_MEMORY_EGL_ALLOCATOR(obj)              (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_GL_MEMORY_EGL_ALLOCATOR))
-+#define GST_IS_GL_MEMORY_EGL_ALLOCATOR_CLASS(klass)      (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_GL_MEMORY_EGL_ALLOCATOR))
-+#define GST_GL_MEMORY_EGL_ALLOCATOR_GET_CLASS(obj)       (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_GL_MEMORY_EGL_ALLOCATOR, GstGLMemoryEGLAllocatorClass))
-+#define GST_GL_MEMORY_EGL_ALLOCATOR(obj)                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_GL_MEMORY_EGL_ALLOCATOR, GstGLMemoryEGLAllocator))
-+#define GST_GL_MEMORY_EGL_ALLOCATOR_CLASS(klass)         (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_GL_MEMORY_EGL_ALLOCATOR, GstGLAllocatorClass))
-+#define GST_GL_MEMORY_EGL_ALLOCATOR_CAST(obj)            ((GstGLMemoryEGLAllocator *)(obj))
-+
-+typedef void (*GstEGLImageDestroyNotify) (GstGLContextEGL * context,
-+    gpointer data);
-+
-+typedef struct _GstEGLImageMemory GstEGLImageMemory;
-+
-+
-+/**
-+ * GstGLMemoryEGL:
-+ *
-+ * Private instance
-+ */
-+struct _GstGLMemoryEGL
-+{
-+  GstGLMemory mem;
-+
-+  EGLImageKHR image;
-+  GstVideoGLTextureOrientation orientation;
-+};
-+
-+/**
-+ * GST_GL_MEMORY_EGL_ALLOCATOR:
-+ *
-+ * The name of the GL Memory EGL allocator
-+ */
-+#define GST_GL_MEMORY_EGL_ALLOCATOR_NAME "GLMemoryEGL"
-+
-+void          gst_gl_memory_egl_init_once               (void);
-+gboolean      gst_is_gl_memory_egl                      (GstMemory * mem);
-+
-+EGLImageKHR   gst_gl_memory_egl_get_image               (GstGLMemoryEGL * mem);
-+EGLDisplay    gst_gl_memory_egl_get_display             (GstGLMemoryEGL * mem);
-+
-+GstVideoGLTextureOrientation gst_gl_memory_egl_get_orientation
-+                                                        (GstGLMemoryEGL * mem);
-+
-+void          gst_gl_memory_egl_set_orientation         (GstGLMemoryEGL * mem,
-+                                      GstVideoGLTextureOrientation orientation);
-+
-+/**
-+ * GstGLAllocator
-+ *
-+ * Opaque #GstGLAllocator struct
-+ */
-+struct _GstGLMemoryEGLAllocator
-+{
-+  GstGLMemoryAllocator parent;
-+};
-+
-+/**
-+ * GstGLAllocatorClass:
-+ *
-+ * The #GstGLAllocatorClass only contains private data
-+ */
-+struct _GstGLMemoryEGLAllocatorClass
-+{
-+  GstGLMemoryAllocatorClass parent_class;
-+};
-+
-+G_END_DECLS
-+
-+#endif /* _GST_GL_MEMORY_EGL_H_ */
-diff --git a/gst-libs/gst/gl/gstgl_fwd.h b/gst-libs/gst/gl/gstgl_fwd.h
-index fb64ff6..73e17bd 100644
---- a/gst-libs/gst/gl/gstgl_fwd.h
-+++ b/gst-libs/gst/gl/gstgl_fwd.h
-@@ -55,6 +55,10 @@ typedef struct _GstGLMemoryPBO GstGLMemoryPBO;
- typedef struct _GstGLMemoryPBOAllocator GstGLMemoryPBOAllocator;
- typedef struct _GstGLMemoryPBOAllocatorClass GstGLMemoryPBOAllocatorClass;
- 
-+typedef struct _GstGLMemoryEGL GstGLMemoryEGL;
-+typedef struct _GstGLMemoryEGLAllocator GstGLMemoryEGLAllocator;
-+typedef struct _GstGLMemoryEGLAllocatorClass GstGLMemoryEGLAllocatorClass;
-+
- typedef struct _GstGLSLStage        GstGLSLStage;
- typedef struct _GstGLSLStagePrivate GstGLSLStagePrivate;
- typedef struct _GstGLSLStageClass   GstGLSLStageClass;
-diff --git a/gst-libs/gst/gl/gstgldisplay.c b/gst-libs/gst/gl/gstgldisplay.c
-index 60dec6a..34770d0 100644
---- a/gst-libs/gst/gl/gstgldisplay.c
-+++ b/gst-libs/gst/gl/gstgldisplay.c
-@@ -68,6 +68,7 @@
- #if GST_GL_HAVE_PLATFORM_EGL
- #include <gst/gl/egl/gstgldisplay_egl.h>
- #include <gst/gl/egl/gsteglimagememory.h>
-+#include <gst/gl/egl/gstglmemoryegl.h>
- #endif
- 
- GST_DEBUG_CATEGORY_STATIC (gst_context);
-@@ -144,6 +145,7 @@ gst_gl_display_init (GstGLDisplay * display)
- 
- #if GST_GL_HAVE_PLATFORM_EGL
-   gst_egl_image_memory_init ();
-+  gst_gl_memory_egl_init_once ();
- #endif
- }
- 
-diff --git a/gst-libs/gst/gl/gstglupload.c b/gst-libs/gst/gl/gstglupload.c
-index 16ed5ea..73a9029 100644
---- a/gst-libs/gst/gl/gstglupload.c
-+++ b/gst-libs/gst/gl/gstglupload.c
-@@ -29,6 +29,7 @@
- 
- #if GST_GL_HAVE_PLATFORM_EGL
- #include "egl/gsteglimagememory.h"
-+#include "egl/gstglmemoryegl.h"
- #endif
- 
- #if GST_GL_HAVE_DMABUF
-@@ -301,6 +302,13 @@ _gl_memory_upload_propose_allocation (gpointer impl, GstQuery * decide_query,
-             context));
-     gst_query_add_allocation_param (query, allocator, &params);
-     gst_object_unref (allocator);
-+
-+#if GST_GL_HAVE_PLATFORM_EGL
-+    allocator =
-+        GST_ALLOCATOR (gst_allocator_find (GST_GL_MEMORY_EGL_ALLOCATOR_NAME));
-+    gst_query_add_allocation_param (query, allocator, &params);
-+    gst_object_unref (allocator);
-+#endif
-   }
- 
-   n_pools = gst_query_get_n_allocation_pools (query);
--- 
-2.5.0
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch
index 369ff93..59321f7 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch
@@ -23,43 +23,43 @@ Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
  sys/decklink/gstdecklinkvideosink.cpp |  2 +-
  3 files changed, 7 insertions(+), 7 deletions(-)
 
-diff --git a/sys/decklink/gstdecklink.cpp b/sys/decklink/gstdecklink.cpp
-index 64637f1..bac956f 100644
---- a/sys/decklink/gstdecklink.cpp
-+++ b/sys/decklink/gstdecklink.cpp
-@@ -324,22 +324,22 @@ gst_decklink_mode_get_structure (GstDecklinkModeEnum e, BMDPixelFormat f)
-       "height", G_TYPE_INT, mode->height,
+Index: gst-plugins-bad-1.10.1/sys/decklink/gstdecklink.cpp
+===================================================================
+--- gst-plugins-bad-1.10.1.orig/sys/decklink/gstdecklink.cpp
++++ gst-plugins-bad-1.10.1/sys/decklink/gstdecklink.cpp
+@@ -476,22 +476,22 @@ gst_decklink_mode_get_structure (GstDeck
        "pixel-aspect-ratio", GST_TYPE_FRACTION, mode->par_n, mode->par_d,
-       "interlace-mode", G_TYPE_STRING, mode->interlaced ? "interleaved" : "progressive",
+       "interlace-mode", G_TYPE_STRING,
+       mode->interlaced ? "interleaved" : "progressive",
 -      "framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d, NULL);
-+      "framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d, (void *) NULL);
++      "framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d, (void *)NULL);
  
    switch (f) {
-     case bmdFormat8BitYUV: /* '2vuy' */
+     case bmdFormat8BitYUV:     /* '2vuy' */
        gst_structure_set (s, "format", G_TYPE_STRING, "UYVY",
            "colorimetry", G_TYPE_STRING, mode->colorimetry,
 -          "chroma-site", G_TYPE_STRING, "mpeg2", NULL);
-+          "chroma-site", G_TYPE_STRING, "mpeg2", (void *) NULL);
++          "chroma-site", G_TYPE_STRING, "mpeg2", (void *)NULL);
        break;
-     case bmdFormat10BitYUV: /* 'v210' */
+     case bmdFormat10BitYUV:    /* 'v210' */
 -      gst_structure_set (s, "format", G_TYPE_STRING, "v210", NULL);
-+      gst_structure_set (s, "format", G_TYPE_STRING, "v210", (void *) NULL);
++      gst_structure_set (s, "format", G_TYPE_STRING, "v210", (void *)NULL);
        break;
-     case bmdFormat8BitARGB: /* 'ARGB' */
+     case bmdFormat8BitARGB:    /* 'ARGB' */
 -      gst_structure_set (s, "format", G_TYPE_STRING, "ARGB", NULL);
-+      gst_structure_set (s, "format", G_TYPE_STRING, "ARGB", (void *) NULL);
++      gst_structure_set (s, "format", G_TYPE_STRING, "ARGB", (void *)NULL);
        break;
-     case bmdFormat8BitBGRA: /* 'BGRA' */
+     case bmdFormat8BitBGRA:    /* 'BGRA' */
 -      gst_structure_set (s, "format", G_TYPE_STRING, "BGRA", NULL);
-+      gst_structure_set (s, "format", G_TYPE_STRING, "BGRA", (void *) NULL);
++      gst_structure_set (s, "format", G_TYPE_STRING, "BGRA", (void *)NULL);
        break;
-     case bmdFormat10BitRGB: /* 'r210' Big-endian RGB 10-bit per component with SMPTE video levels (64-960). Packed as 2:10:10:10 */
-     case bmdFormat12BitRGB: /* 'R12B' Big-endian RGB 12-bit per component with full range (0-4095). Packed as 12-bit per component */
-diff --git a/sys/decklink/gstdecklinkaudiosrc.cpp b/sys/decklink/gstdecklinkaudiosrc.cpp
-index 9a701ee..26fb7ec 100644
---- a/sys/decklink/gstdecklinkaudiosrc.cpp
-+++ b/sys/decklink/gstdecklinkaudiosrc.cpp
-@@ -312,7 +312,7 @@ gst_decklink_audio_src_set_caps (GstBaseSrc * bsrc, GstCaps * caps)
+     case bmdFormat10BitRGB:    /* 'r210' Big-endian RGB 10-bit per component with SMPTE video levels (64-960). Packed as 2:10:10:10 */
+     case bmdFormat12BitRGB:    /* 'R12B' Big-endian RGB 12-bit per component with full range (0-4095). Packed as 12-bit per component */
+Index: gst-plugins-bad-1.10.1/sys/decklink/gstdecklinkaudiosrc.cpp
+===================================================================
+--- gst-plugins-bad-1.10.1.orig/sys/decklink/gstdecklinkaudiosrc.cpp
++++ gst-plugins-bad-1.10.1/sys/decklink/gstdecklinkaudiosrc.cpp
+@@ -322,7 +322,7 @@ gst_decklink_audio_src_set_caps (GstBase
        g_mutex_unlock (&self->input->lock);
  
        if (videosrc) {
@@ -68,11 +68,11 @@ index 9a701ee..26fb7ec 100644
          gst_object_unref (videosrc);
  
          switch (vconn) {
-diff --git a/sys/decklink/gstdecklinkvideosink.cpp b/sys/decklink/gstdecklinkvideosink.cpp
-index eebeff3..da6e486 100644
---- a/sys/decklink/gstdecklinkvideosink.cpp
-+++ b/sys/decklink/gstdecklinkvideosink.cpp
-@@ -158,7 +158,7 @@ reset_framerate (GstCapsFeatures * features, GstStructure * structure,
+Index: gst-plugins-bad-1.10.1/sys/decklink/gstdecklinkvideosink.cpp
+===================================================================
+--- gst-plugins-bad-1.10.1.orig/sys/decklink/gstdecklinkvideosink.cpp
++++ gst-plugins-bad-1.10.1/sys/decklink/gstdecklinkvideosink.cpp
+@@ -163,7 +163,7 @@ reset_framerate (GstCapsFeatures * featu
      gpointer user_data)
  {
    gst_structure_set (structure, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1,
@@ -81,6 +81,3 @@ index eebeff3..da6e486 100644
  
    return TRUE;
  }
--- 
-1.9.1
-
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.1.bb
similarity index 64%
rename from meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.3.bb
rename to meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.1.bb
index ae3f04d..9cd892e 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.3.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.1.bb
@@ -12,16 +12,10 @@ SRC_URI = " \
     file://avoid-including-sys-poll.h-directly.patch \
     file://ensure-valid-sentinels-for-gst_structure_get-etc.patch \
     file://0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch \
-    file://0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch \
-    file://0003-glcolorconvert-implement-multiple-render-targets-for.patch \
-    file://0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch \
-    file://0005-glshader-add-glBindFragDataLocation.patch \
-    file://0006-glcolorconvert-GLES3-deprecates-texture2D-and-it-doe.patch \
-    file://0008-gl-implement-GstGLMemoryEGL.patch \
     file://0009-glimagesink-Downrank-to-marginal.patch \
     file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
 "
-SRC_URI[md5sum] = "955281a43e98c5464563fa049e0a0911"
-SRC_URI[sha256sum] = "7899fcb18e6a1af2888b19c90213af018a57d741c6e72ec56b133bc73ec8509b"
+SRC_URI[md5sum] = "491d2d5aab55ffc60c66e714d3d664ea"
+SRC_URI[sha256sum] = "133e0ed9fe21011b15d3898e3d3a9d17ab74eed31996da2e353353e688ca921d"
 
 S = "${WORKDIR}/gst-plugins-bad-${PV}"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.8.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.10.1.bb
similarity index 85%
rename from meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.8.3.bb
rename to meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.10.1.bb
index 84cbc04..82e5a84 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.8.3.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.10.1.bb
@@ -13,8 +13,7 @@ SRC_URI = " \
     file://make-gio_unix_2_0-dependency-configurable.patch \
     file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
 "
-
-SRC_URI[md5sum] = "4d03dd81828ea6b98a44c8f1ab7f4976"
-SRC_URI[sha256sum] = "114871d4d63606b4af424a8433cd923e4ff66896b244bb7ac97b9da47f71e79e"
+SRC_URI[md5sum] = "eb03953ff239b53a7d69a604edbe5c8c"
+SRC_URI[sha256sum] = "66cfee294c7aaf9d7867eaba4841ca6254ea74f1a8b53e1289f4d3b9b6c976c9"
 
 S = "${WORKDIR}/gst-plugins-base-${PV}"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.8.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.10.1.bb
similarity index 84%
rename from meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.8.3.bb
rename to meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.10.1.bb
index 840df15..44703dc 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.8.3.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.10.1.bb
@@ -11,8 +11,7 @@ SRC_URI = " \
     file://ensure-valid-sentinel-for-gst_structure_get.patch \
     file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
 "
-
-SRC_URI[md5sum] = "473ebb1f15c67de99ddb6e4d027c0876"
-SRC_URI[sha256sum] = "a1d6579ba203a7734927c24b90bf6590d846c5a5fcec01a48201018c8ad2827a"
+SRC_URI[md5sum] = "7d24b1412d49fa7bab763b35f4640abd"
+SRC_URI[sha256sum] = "a7642ea7e7c17fb67e94d0c17e56757b6577fa7ed244ff8c11031841d3556cc2"
 
 S = "${WORKDIR}/gst-plugins-good-${PV}"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.8.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.10.1.bb
similarity index 76%
rename from meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.8.3.bb
rename to meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.10.1.bb
index 4a9a437..1626430 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.8.3.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.10.1.bb
@@ -7,8 +7,7 @@ SRC_URI = " \
     http://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.xz \
     file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
 "
-
-SRC_URI[md5sum] = "4fc66c77253b0ad5ce224bda654b2e7d"
-SRC_URI[sha256sum] = "6fa2599fdd072d31fbaf50c34af406e2be944a010b1f4eab67a5fe32a0310693"
+SRC_URI[md5sum] = "646ab511bc8e56425e63d3fc4812e582"
+SRC_URI[sha256sum] = "a5ecd59fc2091eeb52368de81cc6a91c1a1c19dc5bdde85ce90e1eed5d4183c2"
 
 S = "${WORKDIR}/gst-plugins-ugly-${PV}"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.10.1.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.10.1.bb
new file mode 100644
index 0000000..7b6e4cb
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.10.1.bb
@@ -0,0 +1,6 @@
+include gstreamer1.0-rtsp-server.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d"
+
+SRC_URI[md5sum] = "ae93aa9e5d89a53636a8c0217d8d8c30"
+SRC_URI[sha256sum] = "ddc0c2699598623c2d19d3a2856fb73365496a949783537b238f44bc51e5b005"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.8.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.8.3.bb
deleted file mode 100644
index 17059d0..0000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.8.3.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-include gstreamer1.0-rtsp-server.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d"
-
-SRC_URI[md5sum] = "e4b07b10dd65b6c26c9ca5f72e59297b"
-SRC_URI[sha256sum] = "010f06800c1c957851d1352e5ec7a8ba3ce6a857fec1b8afc7d1a9e5f53288bf"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
index cb0bd82..86c6f66 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
@@ -24,7 +24,6 @@ PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
 PACKAGECONFIG[tests] = "--enable-tests,--disable-tests"
 PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind,"
 PACKAGECONFIG[gst-tracer-hooks] = "--enable-gst-tracer-hooks,--disable-gst-tracer-hooks,"
-PACKAGECONFIG[trace-historic] = "--enable-trace,--disable-trace,"
 
 EXTRA_OECONF = " \
     --disable-dependency-tracking \
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.8.3.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.10.1.bb
similarity index 69%
rename from meta/recipes-multimedia/gstreamer/gstreamer1.0_1.8.3.bb
rename to meta/recipes-multimedia/gstreamer/gstreamer1.0_1.10.1.bb
index d3561eb..428a012 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.8.3.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.10.1.bb
@@ -6,8 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
 SRC_URI = " \
     http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \
 "
-
-SRC_URI[md5sum] = "e88dad542df9d986822e982105d2b530"
-SRC_URI[sha256sum] = "66b37762d4fdcd63bce5a2bec57e055f92420e95037361609900278c0db7c53f"
+SRC_URI[md5sum] = "2c0cc6907aed5ea8005a8f332e34d92f"
+SRC_URI[sha256sum] = "f68df996e0e699382b935bb4783dd402c301377df18f57e28e0318c4b3bff6da"
 
 S = "${WORKDIR}/gstreamer-${PV}"
-- 
2.10.2



^ permalink raw reply related

* [PATCH] msmtp: 1.6.5 -> 1.6.6
From: huangqy @ 2016-11-30 16:36 UTC (permalink / raw)
  To: openembedded-core

From: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>

Upgrade msmtp from 1.6.5 to 1.6.6.

Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>
---
 meta/recipes-extended/msmtp/{msmtp_1.6.5.bb => msmtp_1.6.6.bb} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-extended/msmtp/{msmtp_1.6.5.bb => msmtp_1.6.6.bb} (86%)

diff --git a/meta/recipes-extended/msmtp/msmtp_1.6.5.bb b/meta/recipes-extended/msmtp/msmtp_1.6.6.bb
similarity index 86%
rename from meta/recipes-extended/msmtp/msmtp_1.6.5.bb
rename to meta/recipes-extended/msmtp/msmtp_1.6.6.bb
index d0c39eb..e172193 100644
--- a/meta/recipes-extended/msmtp/msmtp_1.6.5.bb
+++ b/meta/recipes-extended/msmtp/msmtp_1.6.6.bb
@@ -12,8 +12,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 SRC_URI = "http://sourceforge.net/projects/msmtp/files/msmtp/${PV}/${BPN}-${PV}.tar.xz \
           "
 
-SRC_URI[md5sum] = "50a8c9bb72f8222779db6b4aae2965e0"
-SRC_URI[sha256sum] = "76a0d60693c7e65d0c7a12f01d300882d280b1e1be0202f54730ae44d44a5006"
+SRC_URI[md5sum] = "82b0520b57db4b2cf05333d11fb5974d"
+SRC_URI[sha256sum] = "da15db1f62bd0201fce5310adb89c86188be91cd745b7cb3b62b81a501e7fb5e"
 
 inherit gettext autotools update-alternatives pkgconfig
 
-- 
2.7.4





^ permalink raw reply related

* Re: [PATCH 0/2] fix can't login when debug-tweaks is not in IMAGE_FEATURES
From: ChenQi @ 2016-11-30  9:28 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <25721f64-19ae-7998-7e64-5e7a165347eb@windriver.com>

We could make use of EXTRA_USERS_PARAMS here.
More details are in meta/classes/extrausers.bbclass.

I haven't tested it myself, but maybe lines below could work:
INHERIT += "extrausers"
EXTRA_USERS_PARAMS = "\
usermod -p 'root' root; \
"

This info could also be found in local.conf.sample.extended.

Best Regards,
Chen Qi

On 11/30/2016 11:15 AM, Robert Yang wrote:
> Hello,
>
> According to the discussions, here are things that we may do,
> please feel free to give your comments.
> 1) Add an image feature like "production", which will conflict with
>    debug-tweaks, and check for some common security issues ?
>
> 2) Add a way like ROOT_PASSWD to let user can set root passwd easily ?
>
> 3) Do nothing, leave it as the current status.
>
> // Robert
>
> On 11/23/2016 03:49 PM, Robert Yang wrote:
>> Fixed 2 bugs:
>> - Can't login as root when debug-tweaks/empty-root-password is not in
>>   IMAGE_FEATURES since no passwd.
>> - When set root passwd and debug-tweaks/empty-root-password is in
>>   IMAGE_FEATURES, passwd is *required* to login.
>>
>> Filed https://bugzilla.yoctoproject.org/show_bug.cgi?id=10710, and
>> marked doc changes required as yes.
>>
>> // Robert
>>
>> The following changes since commit 
>> a675b2c89e477af088faee9b3be96eae19a85f0b:
>>
>>   sanity.bbclass: fix logging of an error (2016-11-15 15:18:50 +0000)
>>
>> are available in the git repository at:
>>
>>   git://git.openembedded.org/openembedded-core-contrib rbt/root
>> http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/root
>>
>> Robert Yang (2):
>>   rootfs-postcommands.bbclass: fix zap_empty_root_password
>>   base-passwd: set root's default password to 'root'
>>
>>  meta/classes/rootfs-postcommands.bbclass                 |  8 ++++----
>>  .../base-passwd/base-passwd/passwd_master.patch          | 16 
>> ++++++++++++++++
>>  meta/recipes-core/base-passwd/base-passwd_3.5.29.bb      |  1 +
>>  3 files changed, 21 insertions(+), 4 deletions(-)
>>  create mode 100644 
>> meta/recipes-core/base-passwd/base-passwd/passwd_master.patch
>>



^ permalink raw reply

* Re: [PATCH 0/2] fix can't login when debug-tweaks is not in IMAGE_FEATURES
From: ChenQi @ 2016-11-30  9:32 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <bf6fedae-7935-936b-f844-4208f7e76eae@windriver.com>

On 11/30/2016 05:28 PM, ChenQi wrote:
> We could make use of EXTRA_USERS_PARAMS here.
> More details are in meta/classes/extrausers.bbclass.
>
> I haven't tested it myself, but maybe lines below could work:
> INHERIT += "extrausers"
> EXTRA_USERS_PARAMS = "\
> usermod -p 'root' root; \
> "
>

It should be '-P' instead of '-p'.
We implement setting clear text password ourselves via 
allow-for-setting-password-in-clear-text.patch in shadow package.

Regards,
Chen Qi

> This info could also be found in local.conf.sample.extended.
>
> Best Regards,
> Chen Qi
>
> On 11/30/2016 11:15 AM, Robert Yang wrote:
>> Hello,
>>
>> According to the discussions, here are things that we may do,
>> please feel free to give your comments.
>> 1) Add an image feature like "production", which will conflict with
>>    debug-tweaks, and check for some common security issues ?
>>
>> 2) Add a way like ROOT_PASSWD to let user can set root passwd easily ?
>>
>> 3) Do nothing, leave it as the current status.
>>
>> // Robert
>>
>> On 11/23/2016 03:49 PM, Robert Yang wrote:
>>> Fixed 2 bugs:
>>> - Can't login as root when debug-tweaks/empty-root-password is not in
>>>   IMAGE_FEATURES since no passwd.
>>> - When set root passwd and debug-tweaks/empty-root-password is in
>>>   IMAGE_FEATURES, passwd is *required* to login.
>>>
>>> Filed https://bugzilla.yoctoproject.org/show_bug.cgi?id=10710, and
>>> marked doc changes required as yes.
>>>
>>> // Robert
>>>
>>> The following changes since commit 
>>> a675b2c89e477af088faee9b3be96eae19a85f0b:
>>>
>>>   sanity.bbclass: fix logging of an error (2016-11-15 15:18:50 +0000)
>>>
>>> are available in the git repository at:
>>>
>>>   git://git.openembedded.org/openembedded-core-contrib rbt/root
>>> http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/root 
>>>
>>>
>>> Robert Yang (2):
>>>   rootfs-postcommands.bbclass: fix zap_empty_root_password
>>>   base-passwd: set root's default password to 'root'
>>>
>>>  meta/classes/rootfs-postcommands.bbclass                 |  8 ++++----
>>>  .../base-passwd/base-passwd/passwd_master.patch          | 16 
>>> ++++++++++++++++
>>>  meta/recipes-core/base-passwd/base-passwd_3.5.29.bb      |  1 +
>>>  3 files changed, 21 insertions(+), 4 deletions(-)
>>>  create mode 100644 
>>> meta/recipes-core/base-passwd/base-passwd/passwd_master.patch
>>>
>



^ permalink raw reply

* tslib 1.3
From: Martin Kepplinger @ 2016-11-30  9:39 UTC (permalink / raw)
  To: openembedded-core

I found some discussions on tslib in your archives and want to give you
a little update. I'm not even sure core is the correct list for this.

I'm working on tslib for quite some time now. The project page is
https://github.com/kergoth/tslib and has been for quite some time, and
I'm maintaining it there.

With version 1.3 there shouldn't be any need for your environment to be
compatible with tslib's API, as tslib/tools/ts_uinput provides an input
event device to use:

https://github.com/kergoth/tslib#use-tslib-via-a-normal-input-event-device

and you can run it as a daemon (ts_uinput -d).

As of now tslib-1.3-rc1 is out for testing. It adds a new multitouch
API, but ts_uinput should work for single- and multitouch devices and
there shouldn't be a need to wait for Qt or X tslib wrappers to
implement tslib's API or to even have them at all.

The more feedback we get, the earlier we can consider releasing it as
version 1.3.

I hope this is useful,

                           martin

________________________________

Ginzinger electronic systems GmbH
Gewerbegebiet Pirath 16
4952 Weng im Innkreis
www.ginzinger.com

Firmenbuchnummer: FN 364958d
Firmenbuchgericht: Ried im Innkreis
UID-Nr.: ATU66521089



^ permalink raw reply

* [PATCH V2 00/11] system statistics sampling
From: Patrick Ohly @ 2016-11-30  9:50 UTC (permalink / raw)
  To: openembedded-core

buildstats.bbclass gets extended so that disk bandwidth and capacity,
CPU and memory usage get sampled at regular time intervals by
default. pybootchart had code for most of that data, which gets
restored and re-enabled. The disk capacity graph is new.

The original pybootchart just stored raw dumps of the special files
under /proc. bitbake builds run longer, so a more compact ("reduced")
format is used.

Logging disk capacity was mostly motivated by some work on enhancing
rm_work.bbclass behavior, but could also be useful for others ("how
much free space did my build need").

Changes in V2:
  - SystemStats instance survives between event handler calls by
    storing it in the corresponding datastore, instead of using
    a global variable, and open files get closed properly when
    the build ends. This should work better with memres bitbake (not
    tested, though, because of YOCTO #10741).
  - Sampling now already starts when setscene tasks start to run.

The following changes since commit 9f1fe76727e98e58fc9e46ea2b49cf5c0cb48e6c:

  libpcap: Fix build when PACKAGECONFIG ipv6 is not enable (2016-11-23 11:02:33 +0000)

are available in the git repository at:

  git://github.com/pohly/openembedded-core buildstats
  https://github.com/pohly/openembedded-core/tree/buildstats

Patrick Ohly (11):
  buildstats: add system state sampling
  pybootchartgui/draw.py: allow moving process chart up and down
  pybootchartgui/draw.py: fix drawing of samples not starting at zero
  pybootchartgui: show system utilization
  pybootchartgui/draw.py: skip empty CPU and disk usage charts
  buildstats: record disk space usage
  pybootchartgui/parsing.py: fix error handling in meminfo parser
  pybootchartgui: render disk space usage
  pybootchartgui: simplify drawing of memory usage
  buildstats: reduce amount of data stored for system utilization
  pybootchartgui: support reading reduced /proc logs

 meta/classes/buildstats.bbclass                  |  24 +++
 meta/lib/buildstats.py                           | 153 ++++++++++++++++++
 scripts/pybootchartgui/pybootchartgui/draw.py    | 192 ++++++++++++++++-------
 scripts/pybootchartgui/pybootchartgui/parsing.py | 122 +++++++++++---
 scripts/pybootchartgui/pybootchartgui/samples.py |  27 ++++
 5 files changed, 440 insertions(+), 78 deletions(-)
 create mode 100644 meta/lib/buildstats.py

-- 
2.1.4



^ permalink raw reply

* [PATCH V2 01/11] buildstats: add system state sampling
From: Patrick Ohly @ 2016-11-30  9:50 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1480499133.git.patrick.ohly@intel.com>

/proc/[diskstats|meminfo|stat] get sampled and written to the same
proc_<filename>.log files as during normal bootchat logging. This will
allow rendering the CPU, disk and memory usage charts.

Right now sampling happens once a second, triggered by the heartbeat
event.That produces quite a bit of data for long builds, which will be
addressed in a separate commit by storing the data in a more compact
form.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
---
 meta/classes/buildstats.bbclass | 24 +++++++++++++++++++++
 meta/lib/buildstats.py          | 47 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 71 insertions(+)
 create mode 100644 meta/lib/buildstats.py

diff --git a/meta/classes/buildstats.bbclass b/meta/classes/buildstats.bbclass
index 57ecc8f..9c0c37d 100644
--- a/meta/classes/buildstats.bbclass
+++ b/meta/classes/buildstats.bbclass
@@ -188,3 +188,27 @@ python run_buildstats () {
 addhandler run_buildstats
 run_buildstats[eventmask] = "bb.event.BuildStarted bb.event.BuildCompleted bb.build.TaskStarted bb.build.TaskSucceeded bb.build.TaskFailed"
 
+python runqueue_stats () {
+    import buildstats
+    from bb import event, runqueue
+    # We should not record any samples before the first task has started,
+    # because that's the first activity shown in the process chart.
+    # Besides, at that point we are sure that the build variables
+    # are available that we need to find the output directory.
+    # The persistent SystemStats is stored in the datastore and
+    # closed when the build is done.
+    system_stats = d.getVar('_buildstats_system_stats', True)
+    if not system_stats and isinstance(e, (bb.runqueue.sceneQueueTaskStarted, bb.runqueue.runQueueTaskStarted)):
+        system_stats = buildstats.SystemStats(d)
+        d.setVar('_buildstats_system_stats', system_stats)
+    if system_stats:
+        # Ensure that we sample at important events.
+        done = isinstance(e, bb.event.BuildCompleted)
+        system_stats.sample(force=done)
+        if done:
+            system_stats.close()
+            d.delVar('_buildstats_system_stats')
+}
+
+addhandler runqueue_stats
+runqueue_stats[eventmask] = "bb.runqueue.sceneQueueTaskStarted bb.runqueue.runQueueTaskStarted bb.event.HeartbeatEvent bb.event.BuildCompleted"
diff --git a/meta/lib/buildstats.py b/meta/lib/buildstats.py
new file mode 100644
index 0000000..8ce4112
--- /dev/null
+++ b/meta/lib/buildstats.py
@@ -0,0 +1,47 @@
+# Implements system state sampling. Called by buildstats.bbclass.
+# Because it is a real Python module, it can hold persistent state,
+# like open log files and the time of the last sampling.
+
+import time
+
+class SystemStats:
+    def __init__(self, d):
+        bn = d.getVar('BUILDNAME', True)
+        bsdir = os.path.join(d.getVar('BUILDSTATS_BASE', True), bn)
+        bb.utils.mkdirhier(bsdir)
+
+        self.proc_files = []
+        for filename in ('diskstats', 'meminfo', 'stat'):
+            # In practice, this class gets instantiated only once in
+            # the bitbake cooker process.  Therefore 'append' mode is
+            # not strictly necessary, but using it makes the class
+            # more robust should two processes ever write
+            # concurrently.
+            self.proc_files.append((filename,
+                                    open(os.path.join(bsdir, 'proc_%s.log' % filename), 'ab')))
+        # Last time that we sampled data.
+        self.last = 0
+        # Minimum number of seconds between recording a sample. This
+        # becames relevant when we get called very often while many
+        # short tasks get started. Sampling during quiet periods
+        # depends on the heartbeat event, which fires less often.
+        self.min_seconds = 1
+
+    def close(self):
+        self.monitor_disk.close()
+        for _, output, _ in self.proc_files:
+            output.close()
+
+    def sample(self, force):
+        now = time.time()
+        if (now - self.last > self.min_seconds) or force:
+            for filename, output in self.proc_files:
+                with open(os.path.join('/proc', filename), 'rb') as input:
+                    data = input.read()
+                    # Unbuffered raw write, less overhead and useful
+                    # in case that we end up with concurrent writes.
+                    os.write(output.fileno(),
+                             ('%.0f\n' % now).encode('ascii') +
+                             data +
+                             b'\n')
+            self.last = now
-- 
2.1.4



^ permalink raw reply related

* [PATCH V2 02/11] pybootchartgui/draw.py: allow moving process chart up and down
From: Patrick Ohly @ 2016-11-30  9:50 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1480499133.git.patrick.ohly@intel.com>

Substracting curr_y when determining the hight of the process chart is
wrong because the height is independent of the position where the
chart is about to be drawn. It happens to work at the moment because
curr_y is always 10 when render_processes_chart() gets called. But it
leads to a negative height when other charts are drawn above it, and
then the grid gets drawn on top of those other charts.

Substracting some constant is relevant because otherwise the box is
slightly larger than the process bars. Not sure exactly where that
comes from (text height?); leg_s seems a suitable constant and happens
to be 10, so everything still gets rendered exactly as before.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
---
 scripts/pybootchartgui/pybootchartgui/draw.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py b/scripts/pybootchartgui/pybootchartgui/draw.py
index 8c574be..2b5907b 100644
--- a/scripts/pybootchartgui/pybootchartgui/draw.py
+++ b/scripts/pybootchartgui/pybootchartgui/draw.py
@@ -415,7 +415,7 @@ def render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w):
 	return curr_y
 
 def render_processes_chart(ctx, options, trace, curr_y, w, h, sec_w):
-        chart_rect = [off_x, curr_y+header_h, w, h - 2 * off_y - (curr_y+header_h) + proc_h]
+        chart_rect = [off_x, curr_y+header_h, w, h - 2 * off_y - header_h - leg_s + proc_h]
 
 	draw_legend_box (ctx, "Configure", \
 			 TASK_COLOR_CONFIGURE, off_x  , curr_y + 45, leg_s)
-- 
2.1.4



^ permalink raw reply related

* [PATCH V2 03/11] pybootchartgui/draw.py: fix drawing of samples not starting at zero
From: Patrick Ohly @ 2016-11-30  9:50 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1480499133.git.patrick.ohly@intel.com>

The code did not handle x scaling correctly when drawing starts at
some time larger than zero, i.e. it worked for normal bootchart data,
but not for the system statistics recorded by buildstats.bbclass.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
---
 scripts/pybootchartgui/pybootchartgui/draw.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py b/scripts/pybootchartgui/pybootchartgui/draw.py
index 2b5907b..925002d 100644
--- a/scripts/pybootchartgui/pybootchartgui/draw.py
+++ b/scripts/pybootchartgui/pybootchartgui/draw.py
@@ -256,7 +256,7 @@ def draw_chart(ctx, color, fill, chart_bounds, data, proc_tree, data_range):
 	# avoid divide by zero
 	if max_y == 0:
 		max_y = 1.0
-	xscale = float (chart_bounds[2]) / max_x
+	xscale = float (chart_bounds[2]) / (max_x - x_shift)
 	# If data_range is given, scale the chart so that the value range in
 	# data_range matches the chart bounds exactly.
 	# Otherwise, scale so that the actual data matches the chart bounds.
-- 
2.1.4



^ permalink raw reply related

* [PATCH V2 04/11] pybootchartgui: show system utilization
From: Patrick Ohly @ 2016-11-30  9:50 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1480499133.git.patrick.ohly@intel.com>

This enables rendering of the original bootchart charts for CPU, disk
and memory usage. It depends on the /proc samples recorded by the
updated buildstats.bbclass. Currently, empty charts CPU and disk usage
charts are drawn if that data is not present; the memory chart already
gets skipped when there's no data, which will also have to be added
for the other two.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
---
 scripts/pybootchartgui/pybootchartgui/draw.py    | 16 +++++--
 scripts/pybootchartgui/pybootchartgui/parsing.py | 61 +++++++++++++++++-------
 2 files changed, 57 insertions(+), 20 deletions(-)

diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py b/scripts/pybootchartgui/pybootchartgui/draw.py
index 925002d..bddd804 100644
--- a/scripts/pybootchartgui/pybootchartgui/draw.py
+++ b/scripts/pybootchartgui/pybootchartgui/draw.py
@@ -321,6 +321,16 @@ def extents(options, xscale, trace):
 	w = int ((end - start) * sec_w_base * xscale) + 2 * off_x
 	h = proc_h * processes + header_h + 2 * off_y
 
+	if options.charts:
+		if trace.cpu_stats:
+			h += 30 + bar_h
+		if trace.disk_stats:
+			h += 30 + bar_h
+		if trace.monitor_disk:
+			h += 30 + bar_h
+		if trace.mem_stats:
+			h += meminfo_bar_h
+
 	return (w, h)
 
 def clip_visible(clip, rect):
@@ -496,6 +506,9 @@ def render(ctx, options, xscale, trace):
 	w -= 2*off_x
 	curr_y = off_y;
 
+	if options.charts:
+		curr_y = render_charts (ctx, options, clip, trace, curr_y, w, h, sec_w)
+
 	curr_y = render_processes_chart (ctx, options, trace, curr_y, w, h, sec_w)
 
 	return
@@ -513,9 +526,6 @@ def render(ctx, options, xscale, trace):
 	else:
 		curr_y = off_y;
 
-	if options.charts:
-		curr_y = render_charts (ctx, options, clip, trace, curr_y, w, h, sec_w)
-
 	# draw process boxes
 	proc_height = h
 	if proc_tree.taskstats and options.cumulative:
diff --git a/scripts/pybootchartgui/pybootchartgui/parsing.py b/scripts/pybootchartgui/pybootchartgui/parsing.py
index a3a0b0b..af68435 100644
--- a/scripts/pybootchartgui/pybootchartgui/parsing.py
+++ b/scripts/pybootchartgui/pybootchartgui/parsing.py
@@ -38,16 +38,17 @@ class Trace:
         self.min = None
         self.max = None
         self.headers = None
-        self.disk_stats = None
+        self.disk_stats =  []
         self.ps_stats = None
         self.taskstats = None
-        self.cpu_stats = None
+        self.cpu_stats = []
         self.cmdline = None
         self.kernel = None
         self.kernel_tree = None
         self.filename = None
         self.parent_map = None
-        self.mem_stats = None
+        self.mem_stats = []
+        self.times = [] # Always empty, but expected by draw.py when drawing system charts.
 
         if len(paths):
             parse_paths (writer, self, paths)
@@ -58,6 +59,19 @@ class Trace:
                 self.min = min(self.start.keys())
                 self.max = max(self.end.keys())
 
+
+        # Rendering system charts depends on start and end
+        # time. Provide them where the original drawing code expects
+        # them, i.e. in proc_tree.
+        class BitbakeProcessTree:
+            def __init__(self, start_time, end_time):
+                self.start_time = start_time
+                self.end_time = end_time
+                self.duration = self.end_time - self.start_time
+        self.proc_tree = BitbakeProcessTree(min(self.start.keys()),
+                                            max(self.end.keys()))
+
+
         return
 
         # Turn that parsed information into something more useful
@@ -427,7 +441,7 @@ def _parse_proc_stat_log(file):
         # skip the rest of statistics lines
     return samples
 
-def _parse_proc_disk_stat_log(file, numCpu):
+def _parse_proc_disk_stat_log(file):
     """
     Parse file for disk stats, but only look at the whole device, eg. sda,
     not sda1, sda2 etc. The format of relevant lines should be:
@@ -462,7 +476,7 @@ def _parse_proc_disk_stat_log(file, numCpu):
         sums = [ a - b for a, b in zip(sample1.diskdata, sample2.diskdata) ]
         readTput = sums[0] / 2.0 * 100.0 / interval
         writeTput = sums[1] / 2.0 * 100.0 / interval
-        util = float( sums[2] ) / 10 / interval / numCpu
+        util = float( sums[2] ) / 10 / interval
         util = max(0.0, min(1.0, util))
         disk_stats.append(DiskSample(sample2.time, readTput, writeTput, util))
 
@@ -628,6 +642,20 @@ def _parse_cmdline_log(writer, file):
             cmdLines[pid] = values
     return cmdLines
 
+def _parse_bitbake_buildstats(writer, state, filename, file):
+    paths = filename.split("/")
+    task = paths[-1]
+    pn = paths[-2]
+    start = None
+    end = None
+    for line in file:
+        if line.startswith("Started:"):
+            start = int(float(line.split()[-1]))
+        elif line.startswith("Ended:"):
+            end = int(float(line.split()[-1]))
+    if start and end:
+        state.add_process(pn + ":" + task, start, end)
+
 def get_num_cpus(headers):
     """Get the number of CPUs from the system.cpu header property. As the
     CPU utilization graphs are relative, the number of CPUs currently makes
@@ -647,18 +675,17 @@ def get_num_cpus(headers):
 def _do_parse(writer, state, filename, file):
     writer.info("parsing '%s'" % filename)
     t1 = clock()
-    paths = filename.split("/")
-    task = paths[-1]
-    pn = paths[-2]
-    start = None
-    end = None
-    for line in file:
-        if line.startswith("Started:"):
-            start = int(float(line.split()[-1]))
-        elif line.startswith("Ended:"):
-            end = int(float(line.split()[-1]))
-    if start and end:
-        state.add_process(pn + ":" + task, start, end)
+    name = os.path.basename(filename)
+    if name == "proc_diskstats.log":
+        state.disk_stats = _parse_proc_disk_stat_log(file)
+    elif name == "proc_stat.log":
+        state.cpu_stats = _parse_proc_stat_log(file)
+    elif name == "proc_meminfo.log":
+        state.mem_stats = _parse_proc_meminfo_log(file)
+    elif name == "cmdline2.log":
+        state.cmdline = _parse_cmdline_log(writer, file)
+    elif not filename.endswith('.log'):
+        _parse_bitbake_buildstats(writer, state, filename, file)
     t2 = clock()
     writer.info("  %s seconds" % str(t2-t1))
     return state
-- 
2.1.4



^ permalink raw reply related

* [PATCH V2 05/11] pybootchartgui/draw.py: skip empty CPU and disk usage charts
From: Patrick Ohly @ 2016-11-30  9:50 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1480499133.git.patrick.ohly@intel.com>

The only real change is the addition of two if checks that skips the
corresponding drawing code when there is no data.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
---
 scripts/pybootchartgui/pybootchartgui/draw.py | 98 ++++++++++++++-------------
 1 file changed, 50 insertions(+), 48 deletions(-)

diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py b/scripts/pybootchartgui/pybootchartgui/draw.py
index bddd804..ec5dd33 100644
--- a/scripts/pybootchartgui/pybootchartgui/draw.py
+++ b/scripts/pybootchartgui/pybootchartgui/draw.py
@@ -344,56 +344,58 @@ def render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w):
 	proc_tree = options.proc_tree(trace)
 
 	# render bar legend
-	ctx.set_font_size(LEGEND_FONT_SIZE)
-
-	draw_legend_box(ctx, "CPU (user+sys)", CPU_COLOR, off_x, curr_y+20, leg_s)
-	draw_legend_box(ctx, "I/O (wait)", IO_COLOR, off_x + 120, curr_y+20, leg_s)
-
-	# render I/O wait
-	chart_rect = (off_x, curr_y+30, w, bar_h)
-	if clip_visible (clip, chart_rect):
-		draw_box_ticks (ctx, chart_rect, sec_w)
-		draw_annotations (ctx, proc_tree, trace.times, chart_rect)
-		draw_chart (ctx, IO_COLOR, True, chart_rect, \
-			    [(sample.time, sample.user + sample.sys + sample.io) for sample in trace.cpu_stats], \
-			    proc_tree, None)
-		# render CPU load
-		draw_chart (ctx, CPU_COLOR, True, chart_rect, \
-			    [(sample.time, sample.user + sample.sys) for sample in trace.cpu_stats], \
-			    proc_tree, None)
-
-	curr_y = curr_y + 30 + bar_h
+	if trace.cpu_stats:
+		ctx.set_font_size(LEGEND_FONT_SIZE)
+
+		draw_legend_box(ctx, "CPU (user+sys)", CPU_COLOR, off_x, curr_y+20, leg_s)
+		draw_legend_box(ctx, "I/O (wait)", IO_COLOR, off_x + 120, curr_y+20, leg_s)
+
+		# render I/O wait
+		chart_rect = (off_x, curr_y+30, w, bar_h)
+		if clip_visible (clip, chart_rect):
+			draw_box_ticks (ctx, chart_rect, sec_w)
+			draw_annotations (ctx, proc_tree, trace.times, chart_rect)
+			draw_chart (ctx, IO_COLOR, True, chart_rect, \
+				    [(sample.time, sample.user + sample.sys + sample.io) for sample in trace.cpu_stats], \
+				    proc_tree, None)
+			# render CPU load
+			draw_chart (ctx, CPU_COLOR, True, chart_rect, \
+				    [(sample.time, sample.user + sample.sys) for sample in trace.cpu_stats], \
+				    proc_tree, None)
+
+		curr_y = curr_y + 30 + bar_h
 
 	# render second chart
-	draw_legend_line(ctx, "Disk throughput", DISK_TPUT_COLOR, off_x, curr_y+20, leg_s)
-	draw_legend_box(ctx, "Disk utilization", IO_COLOR, off_x + 120, curr_y+20, leg_s)
-
-        # render I/O utilization
-	chart_rect = (off_x, curr_y+30, w, bar_h)
-	if clip_visible (clip, chart_rect):
-		draw_box_ticks (ctx, chart_rect, sec_w)
-		draw_annotations (ctx, proc_tree, trace.times, chart_rect)
-		draw_chart (ctx, IO_COLOR, True, chart_rect, \
-			    [(sample.time, sample.util) for sample in trace.disk_stats], \
-			    proc_tree, None)
-
-	# render disk throughput
-	max_sample = max (trace.disk_stats, key = lambda s: s.tput)
-	if clip_visible (clip, chart_rect):
-		draw_chart (ctx, DISK_TPUT_COLOR, False, chart_rect, \
-			    [(sample.time, sample.tput) for sample in trace.disk_stats], \
-			    proc_tree, None)
-
-	pos_x = off_x + ((max_sample.time - proc_tree.start_time) * w / proc_tree.duration)
-
-	shift_x, shift_y = -20, 20
-	if (pos_x < off_x + 245):
-		shift_x, shift_y = 5, 40
-
-	label = "%dMB/s" % round ((max_sample.tput) / 1024.0)
-	draw_text (ctx, label, DISK_TPUT_COLOR, pos_x + shift_x, curr_y + shift_y)
-
-	curr_y = curr_y + 30 + bar_h
+	if trace.disk_stats:
+		draw_legend_line(ctx, "Disk throughput", DISK_TPUT_COLOR, off_x, curr_y+20, leg_s)
+		draw_legend_box(ctx, "Disk utilization", IO_COLOR, off_x + 120, curr_y+20, leg_s)
+
+		# render I/O utilization
+		chart_rect = (off_x, curr_y+30, w, bar_h)
+		if clip_visible (clip, chart_rect):
+			draw_box_ticks (ctx, chart_rect, sec_w)
+			draw_annotations (ctx, proc_tree, trace.times, chart_rect)
+			draw_chart (ctx, IO_COLOR, True, chart_rect, \
+				    [(sample.time, sample.util) for sample in trace.disk_stats], \
+				    proc_tree, None)
+
+		# render disk throughput
+		max_sample = max (trace.disk_stats, key = lambda s: s.tput)
+		if clip_visible (clip, chart_rect):
+			draw_chart (ctx, DISK_TPUT_COLOR, False, chart_rect, \
+				    [(sample.time, sample.tput) for sample in trace.disk_stats], \
+				    proc_tree, None)
+
+		pos_x = off_x + ((max_sample.time - proc_tree.start_time) * w / proc_tree.duration)
+
+		shift_x, shift_y = -20, 20
+		if (pos_x < off_x + 245):
+			shift_x, shift_y = 5, 40
+
+		label = "%dMB/s" % round ((max_sample.tput) / 1024.0)
+		draw_text (ctx, label, DISK_TPUT_COLOR, pos_x + shift_x, curr_y + shift_y)
+
+		curr_y = curr_y + 30 + bar_h
 
 	# render mem usage
 	chart_rect = (off_x, curr_y+30, w, meminfo_bar_h)
-- 
2.1.4



^ permalink raw reply related

* [PATCH V2 06/11] buildstats: record disk space usage
From: Patrick Ohly @ 2016-11-30  9:50 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1480499133.git.patrick.ohly@intel.com>

Hooks into the new monitordisk.py event and records the used space for
each volume. That is probably the only relevant value when it comes to
visualizing the build and recording more would only increase disk
usage.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
---
 meta/classes/buildstats.bbclass |  4 ++--
 meta/lib/buildstats.py          | 22 +++++++++++++++++-----
 2 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/meta/classes/buildstats.bbclass b/meta/classes/buildstats.bbclass
index 9c0c37d..c6b77e6 100644
--- a/meta/classes/buildstats.bbclass
+++ b/meta/classes/buildstats.bbclass
@@ -204,11 +204,11 @@ python runqueue_stats () {
     if system_stats:
         # Ensure that we sample at important events.
         done = isinstance(e, bb.event.BuildCompleted)
-        system_stats.sample(force=done)
+        system_stats.sample(e, force=done)
         if done:
             system_stats.close()
             d.delVar('_buildstats_system_stats')
 }
 
 addhandler runqueue_stats
-runqueue_stats[eventmask] = "bb.runqueue.sceneQueueTaskStarted bb.runqueue.runQueueTaskStarted bb.event.HeartbeatEvent bb.event.BuildCompleted"
+runqueue_stats[eventmask] = "bb.runqueue.sceneQueueTaskStarted bb.runqueue.runQueueTaskStarted bb.event.HeartbeatEvent bb.event.BuildCompleted bb.event.MonitorDiskEvent"
diff --git a/meta/lib/buildstats.py b/meta/lib/buildstats.py
index 8ce4112..7c8b352 100644
--- a/meta/lib/buildstats.py
+++ b/meta/lib/buildstats.py
@@ -3,6 +3,7 @@
 # like open log files and the time of the last sampling.
 
 import time
+import bb.event
 
 class SystemStats:
     def __init__(self, d):
@@ -19,8 +20,10 @@ class SystemStats:
             # concurrently.
             self.proc_files.append((filename,
                                     open(os.path.join(bsdir, 'proc_%s.log' % filename), 'ab')))
-        # Last time that we sampled data.
-        self.last = 0
+        self.monitor_disk = open(os.path.join(bsdir, 'monitor_disk.log'), 'ab')
+        # Last time that we sampled /proc data resp. recorded disk monitoring data.
+        self.last_proc = 0
+        self.last_disk_monitor = 0
         # Minimum number of seconds between recording a sample. This
         # becames relevant when we get called very often while many
         # short tasks get started. Sampling during quiet periods
@@ -32,9 +35,9 @@ class SystemStats:
         for _, output, _ in self.proc_files:
             output.close()
 
-    def sample(self, force):
+    def sample(self, event, force):
         now = time.time()
-        if (now - self.last > self.min_seconds) or force:
+        if (now - self.last_proc > self.min_seconds) or force:
             for filename, output in self.proc_files:
                 with open(os.path.join('/proc', filename), 'rb') as input:
                     data = input.read()
@@ -44,4 +47,13 @@ class SystemStats:
                              ('%.0f\n' % now).encode('ascii') +
                              data +
                              b'\n')
-            self.last = now
+            self.last_proc = now
+
+        if isinstance(event, bb.event.MonitorDiskEvent) and \
+           ((now - self.last_disk_monitor > self.min_seconds) or force):
+            os.write(self.monitor_disk.fileno(),
+                     ('%.0f\n' % now).encode('ascii') +
+                     ''.join(['%s: %d\n' % (dev, sample.total_bytes - sample.free_bytes)
+                              for dev, sample in event.disk_usage.items()]).encode('ascii') +
+                     b'\n')
+            self.last_disk_monitor = now
-- 
2.1.4



^ permalink raw reply related

* [PATCH V2 07/11] pybootchartgui/parsing.py: fix error handling in meminfo parser
From: Patrick Ohly @ 2016-11-30  9:50 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1480499133.git.patrick.ohly@intel.com>

When matching fails, m.group(0) is invalid and can't be used in the
error message.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
---
 scripts/pybootchartgui/pybootchartgui/parsing.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/pybootchartgui/pybootchartgui/parsing.py b/scripts/pybootchartgui/pybootchartgui/parsing.py
index af68435..48eb048 100644
--- a/scripts/pybootchartgui/pybootchartgui/parsing.py
+++ b/scripts/pybootchartgui/pybootchartgui/parsing.py
@@ -498,7 +498,7 @@ def _parse_proc_meminfo_log(file):
         for line in lines:
             match = meminfo_re.match(line)
             if not match:
-                raise ParseError("Invalid meminfo line \"%s\"" % match.groups(0))
+                raise ParseError("Invalid meminfo line \"%s\"" % line)
             sample.add_value(match.group(1), int(match.group(2)))
 
         if sample.valid():
-- 
2.1.4



^ permalink raw reply related

* [PATCH V2 08/11] pybootchartgui: render disk space usage
From: Patrick Ohly @ 2016-11-30  9:50 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1480499133.git.patrick.ohly@intel.com>

This adds a new, separate chart showing the amount of disk space used
over time for each volume monitored during the build. The hight of the
graph entries represents the delta between current usage and minimal
usage during the build.

That's more useful than showing just the current usage, because then a
graph showing changes in the order of MBs in a volume that is several
GB large would be just flat.

The legend shows the maximum of those deltas, i.e. maximum amount of
space needed for the build. Minor caveat: sampling of disk space usage
starts a bit later than the initial task, so the displayed value may
be slightly lower than the actual amount of space needed because
sampling does not record the actual initial state.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
---
 scripts/pybootchartgui/pybootchartgui/draw.py    | 62 ++++++++++++++++++++++++
 scripts/pybootchartgui/pybootchartgui/parsing.py | 26 ++++++++++
 scripts/pybootchartgui/pybootchartgui/samples.py | 11 +++++
 3 files changed, 99 insertions(+)

diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py b/scripts/pybootchartgui/pybootchartgui/draw.py
index ec5dd33..f0143ad 100644
--- a/scripts/pybootchartgui/pybootchartgui/draw.py
+++ b/scripts/pybootchartgui/pybootchartgui/draw.py
@@ -133,6 +133,16 @@ TASK_COLOR_PACKAGE = (0.0, 1.00, 1.00, 1.0)
 # Package Write RPM/DEB/IPK task color
 TASK_COLOR_PACKAGE_WRITE = (0.0, 0.50, 0.50, 1.0)
 
+# Distinct colors used for different disk volumnes.
+# If we have more volumns, colors get re-used.
+VOLUME_COLORS = [
+	(1.0, 1.0, 0.00, 1.0),
+	(0.0, 1.00, 0.00, 1.0),
+	(1.0, 0.00, 1.00, 1.0),
+	(0.0, 0.00, 1.00, 1.0),
+	(0.0, 1.00, 1.00, 1.0),
+]
+
 # Process states
 STATE_UNDEFINED = 0
 STATE_RUNNING   = 1
@@ -397,6 +407,58 @@ def render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w):
 
 		curr_y = curr_y + 30 + bar_h
 
+	# render disk space usage
+	#
+	# Draws the amount of disk space used on each volume relative to the
+	# lowest recorded amount. The graphs for each volume are stacked above
+	# each other so that total disk usage is visible.
+	if trace.monitor_disk:
+		ctx.set_font_size(LEGEND_FONT_SIZE)
+		# Determine set of volumes for which we have
+		# information and the minimal amount of used disk
+		# space for each. Currently samples are allowed to
+		# not have a values for all volumes; drawing could be
+		# made more efficient if that wasn't the case.
+		volumes = set()
+		min_used = {}
+		for sample in trace.monitor_disk:
+			for volume, used in sample.records.items():
+				volumes.add(volume)
+				if volume not in min_used or min_used[volume] > used:
+					min_used[volume] = used
+		volumes = sorted(list(volumes))
+		disk_scale = 0
+		for i, volume in enumerate(volumes):
+			volume_scale = max([sample.records[volume] - min_used[volume]
+			                    for sample in trace.monitor_disk
+			                    if volume in sample.records])
+			# Does not take length of volume name into account, but fixed offset
+			# works okay in practice.
+			draw_legend_box(ctx, '%s (max: %u MiB)' % (volume, volume_scale / 1024 / 1024),
+			                VOLUME_COLORS[i % len(VOLUME_COLORS)],
+			                off_x + i * 250, curr_y+20, leg_s)
+			disk_scale += volume_scale
+
+		# render used amount of disk space
+		chart_rect = (off_x, curr_y+30, w, bar_h)
+		if clip_visible (clip, chart_rect):
+			draw_box_ticks (ctx, chart_rect, sec_w)
+			draw_annotations (ctx, proc_tree, trace.times, chart_rect)
+			for i in range(len(volumes), 0, -1):
+				draw_chart (ctx, VOLUME_COLORS[(i - 1) % len(VOLUME_COLORS)], True, chart_rect, \
+				            [(sample.time,
+				              # Sum up used space of all volumes including the current one
+				              # so that the graphs appear as stacked on top of each other.
+				              reduce(lambda x,y: x+y,
+				                     [sample.records[volume] - min_used[volume]
+				                      for volume in volumes[0:i]
+				                      if volume in sample.records],
+				                     0))
+				             for sample in trace.monitor_disk], \
+				            proc_tree, [0, disk_scale])
+
+		curr_y = curr_y + 30 + bar_h
+
 	# render mem usage
 	chart_rect = (off_x, curr_y+30, w, meminfo_bar_h)
 	mem_stats = trace.mem_stats
diff --git a/scripts/pybootchartgui/pybootchartgui/parsing.py b/scripts/pybootchartgui/pybootchartgui/parsing.py
index 48eb048..301145a 100644
--- a/scripts/pybootchartgui/pybootchartgui/parsing.py
+++ b/scripts/pybootchartgui/pybootchartgui/parsing.py
@@ -48,6 +48,7 @@ class Trace:
         self.filename = None
         self.parent_map = None
         self.mem_stats = []
+        self.monitor_disk = None
         self.times = [] # Always empty, but expected by draw.py when drawing system charts.
 
         if len(paths):
@@ -506,6 +507,29 @@ def _parse_proc_meminfo_log(file):
 
     return mem_stats
 
+def _parse_monitor_disk_log(file):
+    """
+    Parse file with information about amount of diskspace used.
+    The format of relevant lines should be: ^volume path: number-of-bytes?
+    """
+    disk_stats = []
+    diskinfo_re = re.compile(r'^(.+):\s*(\d+)$')
+
+    for time, lines in _parse_timed_blocks(file):
+        sample = DiskSpaceSample(time)
+
+        for line in lines:
+            match = diskinfo_re.match(line)
+            if not match:
+                raise ParseError("Invalid monitor_disk line \"%s\"" % line)
+            sample.add_value(match.group(1), int(match.group(2)))
+
+        if sample.valid():
+            disk_stats.append(sample)
+
+    return disk_stats
+
+
 # if we boot the kernel with: initcall_debug printk.time=1 we can
 # get all manner of interesting data from the dmesg output
 # We turn this into a pseudo-process tree: each event is
@@ -684,6 +708,8 @@ def _do_parse(writer, state, filename, file):
         state.mem_stats = _parse_proc_meminfo_log(file)
     elif name == "cmdline2.log":
         state.cmdline = _parse_cmdline_log(writer, file)
+    elif name == "monitor_disk.log":
+        state.monitor_disk = _parse_monitor_disk_log(file)
     elif not filename.endswith('.log'):
         _parse_bitbake_buildstats(writer, state, filename, file)
     t2 = clock()
diff --git a/scripts/pybootchartgui/pybootchartgui/samples.py b/scripts/pybootchartgui/pybootchartgui/samples.py
index 015d743..bedca41 100644
--- a/scripts/pybootchartgui/pybootchartgui/samples.py
+++ b/scripts/pybootchartgui/pybootchartgui/samples.py
@@ -53,6 +53,17 @@ class MemSample:
         # discard incomplete samples
         return [v for v in MemSample.used_values if v not in keys] == []
 
+class DiskSpaceSample:
+    def __init__(self, time):
+        self.time = time
+        self.records = {}
+
+    def add_value(self, name, value):
+        self.records[name] = value
+
+    def valid(self):
+        return bool(self.records)
+
 class ProcessSample:
     def __init__(self, time, state, cpu_sample):
         self.time = time
-- 
2.1.4



^ permalink raw reply related

* [PATCH V2 09/11] pybootchartgui: simplify drawing of memory usage
From: Patrick Ohly @ 2016-11-30  9:50 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1480499133.git.patrick.ohly@intel.com>

The internal representation after parsing now matches exactly
what the drawing code needs, thus speeding up drawing a bit.
However, the main motivation is to store exactly that required
information in a more compact file.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
---
 scripts/pybootchartgui/pybootchartgui/draw.py    | 12 ++++++------
 scripts/pybootchartgui/pybootchartgui/parsing.py |  2 +-
 scripts/pybootchartgui/pybootchartgui/samples.py | 16 ++++++++++++++++
 3 files changed, 23 insertions(+), 7 deletions(-)

diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py b/scripts/pybootchartgui/pybootchartgui/draw.py
index f0143ad..201ce45 100644
--- a/scripts/pybootchartgui/pybootchartgui/draw.py
+++ b/scripts/pybootchartgui/pybootchartgui/draw.py
@@ -463,25 +463,25 @@ def render_charts(ctx, options, clip, trace, curr_y, w, h, sec_w):
 	chart_rect = (off_x, curr_y+30, w, meminfo_bar_h)
 	mem_stats = trace.mem_stats
 	if mem_stats and clip_visible (clip, chart_rect):
-		mem_scale = max(sample.records['MemTotal'] - sample.records['MemFree'] for sample in mem_stats)
+		mem_scale = max(sample.buffers for sample in mem_stats)
 		draw_legend_box(ctx, "Mem cached (scale: %u MiB)" % (float(mem_scale) / 1024), MEM_CACHED_COLOR, off_x, curr_y+20, leg_s)
 		draw_legend_box(ctx, "Used", MEM_USED_COLOR, off_x + 240, curr_y+20, leg_s)
 		draw_legend_box(ctx, "Buffers", MEM_BUFFERS_COLOR, off_x + 360, curr_y+20, leg_s)
-		draw_legend_line(ctx, "Swap (scale: %u MiB)" % max([(sample.records['SwapTotal'] - sample.records['SwapFree'])/1024 for sample in mem_stats]), \
+		draw_legend_line(ctx, "Swap (scale: %u MiB)" % max([(sample.swap)/1024 for sample in mem_stats]), \
 				 MEM_SWAP_COLOR, off_x + 480, curr_y+20, leg_s)
 		draw_box_ticks(ctx, chart_rect, sec_w)
 		draw_annotations(ctx, proc_tree, trace.times, chart_rect)
 		draw_chart(ctx, MEM_BUFFERS_COLOR, True, chart_rect, \
-			   [(sample.time, sample.records['MemTotal'] - sample.records['MemFree']) for sample in trace.mem_stats], \
+			   [(sample.time, sample.buffers) for sample in trace.mem_stats], \
 			   proc_tree, [0, mem_scale])
 		draw_chart(ctx, MEM_USED_COLOR, True, chart_rect, \
-			   [(sample.time, sample.records['MemTotal'] - sample.records['MemFree'] - sample.records['Buffers']) for sample in mem_stats], \
+			   [(sample.time, sample.used) for sample in mem_stats], \
 			   proc_tree, [0, mem_scale])
 		draw_chart(ctx, MEM_CACHED_COLOR, True, chart_rect, \
-			   [(sample.time, sample.records['Cached']) for sample in mem_stats], \
+			   [(sample.time, sample.cached) for sample in mem_stats], \
 			   proc_tree, [0, mem_scale])
 		draw_chart(ctx, MEM_SWAP_COLOR, False, chart_rect, \
-			   [(sample.time, float(sample.records['SwapTotal'] - sample.records['SwapFree'])) for sample in mem_stats], \
+			   [(sample.time, float(sample.swap)) for sample in mem_stats], \
 			   proc_tree, None)
 
 		curr_y = curr_y + meminfo_bar_h
diff --git a/scripts/pybootchartgui/pybootchartgui/parsing.py b/scripts/pybootchartgui/pybootchartgui/parsing.py
index 301145a..1c8d8ef 100644
--- a/scripts/pybootchartgui/pybootchartgui/parsing.py
+++ b/scripts/pybootchartgui/pybootchartgui/parsing.py
@@ -503,7 +503,7 @@ def _parse_proc_meminfo_log(file):
             sample.add_value(match.group(1), int(match.group(2)))
 
         if sample.valid():
-            mem_stats.append(sample)
+            mem_stats.append(DrawMemSample(sample))
 
     return mem_stats
 
diff --git a/scripts/pybootchartgui/pybootchartgui/samples.py b/scripts/pybootchartgui/pybootchartgui/samples.py
index bedca41..9fc309b 100644
--- a/scripts/pybootchartgui/pybootchartgui/samples.py
+++ b/scripts/pybootchartgui/pybootchartgui/samples.py
@@ -53,6 +53,22 @@ class MemSample:
         # discard incomplete samples
         return [v for v in MemSample.used_values if v not in keys] == []
 
+class DrawMemSample:
+    """
+    Condensed version of a MemSample with exactly the values used by the drawing code.
+    Initialized either from a valid MemSample or
+    a tuple/list of buffer/used/cached/swap values.
+    """
+    def __init__(self, mem_sample):
+        self.time = mem_sample.time
+        if isinstance(mem_sample, MemSample):
+            self.buffers = mem_sample.records['MemTotal'] - mem_sample.records['MemFree']
+            self.used = mem_sample.records['MemTotal'] - mem_sample.records['MemFree'] - mem_sample.records['Buffers']
+            self.cached = mem_sample.records['Cached']
+            self.swap = mem_sample.records['SwapTotal'] - mem_sample.records['SwapFree']
+        else:
+            self.buffers, self.used, self.cached, self.swap = mem_sample
+
 class DiskSpaceSample:
     def __init__(self, time):
         self.time = time
-- 
2.1.4



^ permalink raw reply related

* [PATCH V2 10/11] buildstats: reduce amount of data stored for system utilization
From: Patrick Ohly @ 2016-11-30  9:50 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1480499133.git.patrick.ohly@intel.com>

Pre-processing /proc data during the build considerably reduces the
amount of data written to disk: 176KB instead of 4.7MB for a 20
minuted build. Parsing also becomes faster.

The disk monitor log added another 16KB in that example build. The
overall buildstat was 20MB, so the overhead for monitoring system
utilization is small enough that it can be enabled by default.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
---
 meta/lib/buildstats.py | 114 ++++++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 104 insertions(+), 10 deletions(-)

diff --git a/meta/lib/buildstats.py b/meta/lib/buildstats.py
index 7c8b352..9e5b6be 100644
--- a/meta/lib/buildstats.py
+++ b/meta/lib/buildstats.py
@@ -3,6 +3,7 @@
 # like open log files and the time of the last sampling.
 
 import time
+import re
 import bb.event
 
 class SystemStats:
@@ -12,14 +13,18 @@ class SystemStats:
         bb.utils.mkdirhier(bsdir)
 
         self.proc_files = []
-        for filename in ('diskstats', 'meminfo', 'stat'):
+        for filename, handler in (
+                ('diskstats', self._reduce_diskstats),
+                ('meminfo', self._reduce_meminfo),
+                ('stat', self._reduce_stat),
+        ):
             # In practice, this class gets instantiated only once in
             # the bitbake cooker process.  Therefore 'append' mode is
             # not strictly necessary, but using it makes the class
             # more robust should two processes ever write
             # concurrently.
-            self.proc_files.append((filename,
-                                    open(os.path.join(bsdir, 'proc_%s.log' % filename), 'ab')))
+            destfile = os.path.join(bsdir, '%sproc_%s.log' % ('reduced_' if handler else '', filename))
+            self.proc_files.append((filename, open(destfile, 'ab'), handler))
         self.monitor_disk = open(os.path.join(bsdir, 'monitor_disk.log'), 'ab')
         # Last time that we sampled /proc data resp. recorded disk monitoring data.
         self.last_proc = 0
@@ -30,23 +35,112 @@ class SystemStats:
         # depends on the heartbeat event, which fires less often.
         self.min_seconds = 1
 
+        self.meminfo_regex = re.compile(b'^(MemTotal|MemFree|Buffers|Cached|SwapTotal|SwapFree):\s*(\d+)')
+        self.diskstats_regex = re.compile(b'^([hsv]d.|mtdblock\d|mmcblk\d|cciss/c\d+d\d+.*)$')
+        self.diskstats_ltime = None
+        self.diskstats_data = None
+        self.stat_ltimes = None
+
     def close(self):
         self.monitor_disk.close()
         for _, output, _ in self.proc_files:
             output.close()
 
+    def _reduce_meminfo(self, time, data):
+        """
+        Extracts 'MemTotal', 'MemFree', 'Buffers', 'Cached', 'SwapTotal', 'SwapFree'
+        and writes their values into a single line, in that order.
+        """
+        values = {}
+        for line in data.split(b'\n'):
+            m = self.meminfo_regex.match(line)
+            if m:
+                values[m.group(1)] = m.group(2)
+        if len(values) == 6:
+            return (time,
+                    b' '.join([values[x] for x in
+                               (b'MemTotal', b'MemFree', b'Buffers', b'Cached', b'SwapTotal', b'SwapFree')]) + b'\n')
+
+    def _diskstats_is_relevant_line(self, linetokens):
+        if len(linetokens) != 14:
+            return False
+        disk = linetokens[2]
+        return self.diskstats_regex.match(disk)
+
+    def _reduce_diskstats(self, time, data):
+        relevant_tokens = filter(self._diskstats_is_relevant_line, map(lambda x: x.split(), data.split(b'\n')))
+        diskdata = [0] * 3
+        reduced = None
+        for tokens in relevant_tokens:
+            # rsect
+            diskdata[0] += int(tokens[5])
+            # wsect
+            diskdata[1] += int(tokens[9])
+            # use
+            diskdata[2] += int(tokens[12])
+        if self.diskstats_ltime:
+            # We need to compute information about the time interval
+            # since the last sampling and record the result as sample
+            # for that point in the past.
+            interval = time - self.diskstats_ltime
+            if interval > 0:
+                sums = [ a - b for a, b in zip(diskdata, self.diskstats_data) ]
+                readTput = sums[0] / 2.0 * 100.0 / interval
+                writeTput = sums[1] / 2.0 * 100.0 / interval
+                util = float( sums[2] ) / 10 / interval
+                util = max(0.0, min(1.0, util))
+                reduced = (self.diskstats_ltime, (readTput, writeTput, util))
+
+        self.diskstats_ltime = time
+        self.diskstats_data = diskdata
+        return reduced
+
+
+    def _reduce_nop(self, time, data):
+        return (time, data)
+
+    def _reduce_stat(self, time, data):
+        if not data:
+            return None
+        # CPU times {user, nice, system, idle, io_wait, irq, softirq} from first line
+        tokens = data.split(b'\n', 1)[0].split()
+        times = [ int(token) for token in tokens[1:] ]
+        reduced = None
+        if self.stat_ltimes:
+            user = float((times[0] + times[1]) - (self.stat_ltimes[0] + self.stat_ltimes[1]))
+            system = float((times[2] + times[5] + times[6]) - (self.stat_ltimes[2] + self.stat_ltimes[5] + self.stat_ltimes[6]))
+            idle = float(times[3] - self.stat_ltimes[3])
+            iowait = float(times[4] - self.stat_ltimes[4])
+
+            aSum = max(user + system + idle + iowait, 1)
+            reduced = (time, (user/aSum, system/aSum, iowait/aSum))
+
+        self.stat_ltimes = times
+        return reduced
+
     def sample(self, event, force):
         now = time.time()
         if (now - self.last_proc > self.min_seconds) or force:
-            for filename, output in self.proc_files:
+            for filename, output, handler in self.proc_files:
                 with open(os.path.join('/proc', filename), 'rb') as input:
                     data = input.read()
-                    # Unbuffered raw write, less overhead and useful
-                    # in case that we end up with concurrent writes.
-                    os.write(output.fileno(),
-                             ('%.0f\n' % now).encode('ascii') +
-                             data +
-                             b'\n')
+                    if handler:
+                        reduced = handler(now, data)
+                    else:
+                        reduced = (now, data)
+                    if reduced:
+                        if isinstance(reduced[1], bytes):
+                            # Use as it is.
+                            data = reduced[1]
+                        else:
+                            # Convert to a single line.
+                            data = (' '.join([str(x) for x in reduced[1]]) + '\n').encode('ascii')
+                        # Unbuffered raw write, less overhead and useful
+                        # in case that we end up with concurrent writes.
+                        os.write(output.fileno(),
+                                 ('%.0f\n' % reduced[0]).encode('ascii') +
+                                 data +
+                                 b'\n')
             self.last_proc = now
 
         if isinstance(event, bb.event.MonitorDiskEvent) and \
-- 
2.1.4



^ permalink raw reply related

* [PATCH V2 11/11] pybootchartgui: support reading reduced /proc logs
From: Patrick Ohly @ 2016-11-30  9:50 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1480499133.git.patrick.ohly@intel.com>

Pre-processing /proc data during the build considerably reduces the
amount of data written to disk: 176KB instead of 4.7MB for a 20
minuted build. Parsing also becomes faster.

buildstats.bbclass only writes the reduced logs now, but support for
the full /proc files is kept around as reference.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
---
 scripts/pybootchartgui/pybootchartgui/parsing.py | 31 ++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/scripts/pybootchartgui/pybootchartgui/parsing.py b/scripts/pybootchartgui/pybootchartgui/parsing.py
index 1c8d8ef..bcfb2da 100644
--- a/scripts/pybootchartgui/pybootchartgui/parsing.py
+++ b/scripts/pybootchartgui/pybootchartgui/parsing.py
@@ -442,6 +442,12 @@ def _parse_proc_stat_log(file):
         # skip the rest of statistics lines
     return samples
 
+def _parse_reduced_log(file, sample_class):
+    samples = []
+    for time, lines in _parse_timed_blocks(file):
+        samples.append(sample_class(time, *[float(x) for x in lines[0].split()]))
+    return samples
+
 def _parse_proc_disk_stat_log(file):
     """
     Parse file for disk stats, but only look at the whole device, eg. sda,
@@ -483,6 +489,25 @@ def _parse_proc_disk_stat_log(file):
 
     return disk_stats
 
+def _parse_reduced_proc_meminfo_log(file):
+    """
+    Parse file for global memory statistics with
+    'MemTotal', 'MemFree', 'Buffers', 'Cached', 'SwapTotal', 'SwapFree' values
+    (in that order) directly stored on one line.
+    """
+    used_values = ('MemTotal', 'MemFree', 'Buffers', 'Cached', 'SwapTotal', 'SwapFree',)
+
+    mem_stats = []
+    for time, lines in _parse_timed_blocks(file):
+        sample = MemSample(time)
+        for name, value in zip(used_values, lines[0].split()):
+            sample.add_value(name, int(value))
+
+        if sample.valid():
+            mem_stats.append(DrawMemSample(sample))
+
+    return mem_stats
+
 def _parse_proc_meminfo_log(file):
     """
     Parse file for global memory statistics.
@@ -702,10 +727,16 @@ def _do_parse(writer, state, filename, file):
     name = os.path.basename(filename)
     if name == "proc_diskstats.log":
         state.disk_stats = _parse_proc_disk_stat_log(file)
+    elif name == "reduced_proc_diskstats.log":
+        state.disk_stats = _parse_reduced_log(file, DiskSample)
     elif name == "proc_stat.log":
         state.cpu_stats = _parse_proc_stat_log(file)
+    elif name == "reduced_proc_stat.log":
+        state.cpu_stats = _parse_reduced_log(file, CPUSample)
     elif name == "proc_meminfo.log":
         state.mem_stats = _parse_proc_meminfo_log(file)
+    elif name == "reduced_proc_meminfo.log":
+        state.mem_stats = _parse_reduced_proc_meminfo_log(file)
     elif name == "cmdline2.log":
         state.cmdline = _parse_cmdline_log(writer, file)
     elif name == "monitor_disk.log":
-- 
2.1.4



^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox