mkelfimage-native:make failed if libz not in host

mkelfimage-native finds libz from host dir, not
from the staging directories.

Modify confiugre.ac to let makefile find libz
and zlib.h by CFLAGS and LDFLAGS.

[YOCTO #3547]

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
runqemu: add support for FSTYPE=vmdk

Allow vmdk images to be run through the 'runqemu' facility.

Signed-off-by: Saul Wold <sgw@linux.intel.com>
classes/*_rpm: integrate Smart into RPM filesystem construction

Use Smart to construct the root filesystem for images and the contents
of SDKs rather than the custom scripts around rpm we had previously.
This ensures the result when producing an updated image will be the
same as upgrading to the same package versions from an older image on
the target, as well as allowing us to remove a substantial amount of
code making the rpm classes much easier to follow.

Some bugfixes from Bogdan Marinescu <bogdan.marinescu@intel.com>.
SDK implementation and testing as well as a number of bugfixes from
Mark Hatle <mark.hatle@windriver.com>.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
classes/rootfs_rpm: install smart instead of zypper in rpm-based images

Switch over to smart on the target when package-management is enabled.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Update sanity tests to use smart instead of zypper

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
package_rpm: Update the way the multilib package names are translated

The variable MULTILIB_PACKAGE_ARCHS has been removed in favor of a
repurposed MULTILIB_PREFIX_LIST.  The format of this item is now
<libid>:<arch>:<arch1>:...:<archN>.  This ensures that we can correctly
translate the libid to one of the supported archs in a tri-lib system.

All of the users of MULTILIB_PREFIX_LIST and MULTILIB_PACKAGE_ARCHS have
been modified accordingly.

Also change the way attempted packages are installed, verify the package
exists in the translate functions, then perform the install in one single
operation.  This results in a significantly faster install time.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
package_rpm.bbclass: Fix the way the RPM platform file is generated

When generating an SDK, we need to use either the SDK or TARGET version
of the OS.  They are not interchangable!

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
package_rpm.bbclass: Add additional logging

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
package_rpm.bbclass: Add support for incremental installs

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
package_rpm.bbclass: Add additional install error detection

There is a condition where the package will fail to install, but smart does
not capture the error.  Add the error string to the scan list.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
rpm/smart: Fix runtime-relocation issues w/ RPM and Smart

Fix runtime-relocation issues with the RPM and Smart wrappers.

In addition the patches were necessary to fix related problems.
The changes to the includes three categories of issues:
  *) Incorrect pathname evaluations
  *) Incorrect evaluation of the /etc/rpm/platform file contents
  *) Confusing vendor #define checks

Finally, a simple way to debug the platformScore was added as
that is necessary to debug how this works and into the smart system.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
package_rpm.bbclass: Add a simply way to enable RPM debugging

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
package_rpm: Workaround for 'all' arch multilib package naming

[YOCTO #3565]

All packages should not be multilib specific, however when the multilib
rules run, they automatically rename the 'all' target recipes.  As such
there is no way to know if an 'all' package should or should not contain
the multilib prefix.  We workaround this issue in the translate function
by checking to see if the runtime-reverse file exists or not.

The workaround should be removed once a proper solution to the architectural
issue is in place.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
native tools set packagegroup

This packagegroup is a toolset that contains most
of the native packages.

[YOCTO #3298]

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
newt: enable python support

Compile newt with python support. There may be packages that need newt's
python extension.

Add python to DEPENDS. And add patch fix_python_fpic.patch to compile
python .so module with flag -fPIC.

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
perf: kill -Werror

this fails to build using a recent sourcery toolchain due to
unused-but-set-variable

Signed-off-by: Christopher Larson <chris_larson@mentor.com>

the patch was imported from meta-mentor layer on yoctoproject git server
http://git.yoctoproject.org/cgit/cgit.cgi/meta-mentor as of commit ids
82e96b3baa1c64d03412871fce56d496a338f167 and
ae325d011bd50501fe677c8b37295ae83030c526

Signed-off-by: Fahad Usman <fahad_usman@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
perf: pass CFLAGS and LDFLAGS

Signed-off-by: Christopher Larson <chris_larson@mentor.com>

the patch was imported from meta-mentor layer on yoctoproject git server
http://git.yoctoproject.org/cgit/cgit.cgi/meta-mentor as of commit id
9d698004137c1a888d40d6a4808d94afa22387e7

Signed-off-by: Fahad Usman <fahad_usman@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
iperf: pass in target path vars

Signed-off-by: Christopher Larson <chris_larson@mentor.com>

the patch was imported from meta-mentor layer on yoctoproject git server
http://git.yoctoproject.org/cgit/cgit.cgi/meta-mentor as of commit id
71748b54694f4ffe2d598da71f641969df1417c0

slightly modified the patch to apply it on .bb file instead of .bbappend

Signed-off-by: Fahad Usman <fahad_usman@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
squashfs: fix CVE-2012-4025

CQID:WIND00366813

Reference: http://squashfs.git.sourceforge.net/git/gitweb.cgi?
p=squashfs/squashfs;a=patch;h=8515b3d420f502c5c0236b86e2d6d7e3b23c190e

Integer overflow in the queue_init function in unsquashfs.c in
unsquashfs in Squashfs 4.2 and earlier allows remote attackers
to execute arbitrary code via a crafted block_log field in the
superblock of a .sqsh file, leading to a heap-based buffer overflow.

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

Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com>

[YOCTO #3564]
Signed-off-by: Saul Wold <sgw@linux.intel.com>
ghostscript-native:fix host underlinking issues

The ghostscript-native will check libtiff
automatically at configure time and libtiff
needs libjpeg. If libtiff and libjpeg is
just populated to staging native directories
and the host doesn't install them, the libjpeg
could not be linked, fail with:

|libjpeg.so.8, needed by libtiff.so, not found
|libtiff.so: undefined reference to
`jpeg_set_defaults@LIBJPEG_8.0'
|collect2: error: ld returned 1 exit status

Disable libtiff support to fix this issue and
modify configure to let disable system libtiff
could work.
We also explicity disable fontconfig, freetype,
cups for ghostscript-native to avoid the similar
issues.

[YOCTO #3562]

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>