Python: Fix for CVE-2012-2135

Reference:http://bugs.python.org/issue14579

The utf-16 decoder in Python 3.1 through 3.3 does not update the
aligned_end variable after calling the unicode_decode_call_errorhandler
function, which allows remote attackers to obtain sensitive information
(process memory) or cause a denial of service (memory corruption and crash)
via unspecified vectors.

http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-2135

[YOCTO #3450]

Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
btrfs-tools: added PV to git package recipe

Signed-off-by: Emilia Ciobanu <emilia.maria.silvia.ciobanu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
kernel: extract functions for kernel modules to separate bbclass

* this way we can reuse the same functionality also for external modules
  including module_autoload_foo and module_conf_foo functionality
* MODULE_PACKAGES variable was removed (splited modules are now returned
  by do_split_packages
* KERNEL_MODULES_META_PACKAGE is used to append all splitted packages
  to RDEPENDS. In kernel.bbclass it's old "kernel-modules" in
  module.bbclass it defaults to ${PN} for upgrade path from
  single PN with all modules to PN depending on all new kernel-module-*

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
package_rpm.bbclass: Optimise per file dependency handling

Currently the process for injecting the per file rpm dependencies into
rpmbuild is painfully slow. Its done through the repeated execution of
a script which has to return the correct value in each case. This continual
execution means the CPU usage of rpmbuild is low.

This patch allows the option of collapsing the per file dependencies to
a per package basis and injecting them through the .spec file. This removes
the execution overhead and allows rpmbuild to run at 100% of cpu.

Ultimately it would be nice to inject the per file dependencies through
the .spec file however that is not currently possible.

Since few people use the per file dependency information, this patch
goes for the faster approach. It can be enabled if anyone needs it although
I'd mention that its being used to us as this code may well go away in
the future if nobody complains.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
iproute2: Fix build failure on ppc

Latest version bump started failing for ppc32
attached patch is a backport from 3.9-rc1

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
gcc-common.inc: handle case where tune is not defined

Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
libpfm4_4.3.0.bb: use compatible host to limit arches

This is only test with powerpc64 currently, even though
it should work on other arches such as x86 and sparc. When
thos are testing and working this COMPATIBLE_HOST should
be updated

Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
oprofile: update patch for powerpc64

This is a more appropriate follow up patch from upstream. Also,
only powerpc64 requires libpfm4 currently for this specific
version of oprofile (x86, sparc can make use of libpfm but
don't make use of it here)

Additionally, this patch from upstream requires some more
patches to be pulled into oprofile

Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
kernel-arch.bbclass: don't pass extra args to KERNEL_{CC, LD, AR}

Commit a3ca06c3b45c791dd38dbf154ad0fc62b4063475 added extra args to
KERNEL_CC, these revert that bit while maintaining machine additions
in TARGET_??_KERNEL_ARCH

Producing incorrect instructions and generating the following errors:

   CC      arch/powerpc/kernel/init_task.o
| {standard input}: Assembler messages:
| {standard input}:384: Error: junk at end of line: `1'
| {standard input}:949: Error: junk at end of line: `1'
| {standard input}:1428: Error: junk at end of line: `1'
| {standard input}:1526: Error: junk at end of line: `1'
| {standard input}:1626: Error: junk at end of line: `1'
| {standard input}:1685: Error: junk at end of line: `1'
| {standard input}:1973: Error: junk at end of line: `1'
| {standard input}:2001: Error: junk at end of line: `1'
| {standard input}:2100: Error: junk at end of line: `1'
| {standard input}:2168: Error: junk at end of line: `1'
| {standard input}:2520: Error: junk at end of line: `1'
|   CC      arch/powerpc/lib/locks.o

Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
recipes: Fix ALLOW_EMPTY with no package specified

There are various usages of ALLOW_EMPTY with no packages specified. This
is not recommended syntax, nor is it likely to be supported in the future.
This patch improves the references in OE-Core, either removing them if they're
pointless (e.g. when PACKAGES="") or specifying which package it applies to.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
buildhistory: Allow the version backwards check to be disabled

When the PR service is not enabled, the versions can go backwards and there
are cases we don't want to know about this. This patch adds a variable
allowing these checks to be turned off whilst still using buildhistory.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
documentation: Fix P entry

P is PN-PV, not PN-PF.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
apr: add libtool to SSTATE_SCAN_FILES

The hardcoded paths in libtool will cause apache2 compile fail at
link stage when the package apr is installed from sstate cache, so
add libtool to SSTATE_SCAN_FILES.

[ CQID: WIND00405372 ]

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
sstate.bbclass: consider postinstall dependencies too

When checking the dependencies in setscene_depvalid(), make sure we also
consider those dependencies needed when running the postinstalls on
host.

[YOCTO #3918]

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
gtk-update-icon-cache-native: add

This recipe builds natively just the gtk-update-icon-cache binary that is
required to run the gtk-icon-cache.bbclass postinstall scripts.

The advantage of doing this is it means running 400 less tasks which takes four
minutes on my machine, as the alternative is building GTK+ natively (and so
libX11, freetype, fontconfig...).

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
default-providers: add default virtual provider for gtk-update-icon-cache

Use a virtual provider instead of a hard dependency so that if gtk+-native is
required in some configuration, this provider can be changed and then
gtk+-native and gtk-update-icon-cache-native won't be both built and conflict in
the sysroot.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
gtk+: mark as provider of virtual/gtk-update-icon-cache-native

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
gtk-icon-cache: use virtual/gtk-update-icon-cache-native instead of gtk+-native

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
sstate: Add gtk-update-icon-cache-native to postinst recipes list

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
apt: upgrade to 0.9.7.7

bb files: remove invalid config.sub/config.guess files (autotools will
generate the correct files)
allocate-larger-memory.patch: not needed anymore
fix-gcc-4.6-null-not-defined.patch: added
	- include header that defines NULL
includes-fix.patch: not needed anymore
localefixes.patch: removed
	- not necessary anymore (no compiling errors)
makerace.patch: adapted to the new version
no-ko-translation.patch: adapted to the new version
no-nls-dpkg.patch: added
	- fix build without nls
noconfigure.patch: adapted to the new version
nodoc.patch: adapted to the new version (apply patch on all cases
because the doc generation needs docbook-xsl)
remove-redeclaration.patch: not needed anymore
truncate-filename.patch: moved
use-host.patch: adapted to the new version
no-curl.patch: adapted to the new version
disable-configure-in-makefile.patch: added
    - do not run configure at do_compile

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>