wic/bootimg-pcbios.py: checking the existance of syslinux

While syslinux not existed in $bootimg_dir, there was a error:

$ wic create directdisk -e core-image-minimal
...
|Creating image(s)...
|Error: exec_cmd: install -m 444 /home/jiahongxu/yocto/
build-20141010-yocto/tmp/deploy/images/qemux86-64/syslinux/
ldlinux.sys /var/tmp/wic/build/hdd/boot/ldlinux.sys
returned '1' instead of 0
...

Add checking for the existance of syslinux to fix this issue.
If syslinux didn't exist in anywhere, prompt user to build it.

[YOCTO #6826]

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
python: force off_t size to 8 to enable large file support

If DISTRO_FEATURES contains "largefile", force the size of off_t to 8 as
a workaround for having ac_cv_sizeof_off_t=4 on 32-bit systems. In
future we will likely drop the value from the site file, but for now
this is a slightly safer fix.

Fixes [YOCTO #6813].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
openssh: avoid screen sessions being killed on disconnect with systemd

Tell systemd just to kill the sshd process when the ssh connection drops
instead of the entire cgroup for sshd, so that any screen sessions (and
more to the point, processes within them) do not get killed.

(This is what the Fedora sshd service file does, and what we're already
doing in the dropbear service file).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
file: add wrapper to nativesdk-file

"file" command in exported SDK doesn't work:
...
$ file sysroots/
file: could not find any valid magic files!
...

In oe-core commit 68d548cbae729eaea8ce1403dc95ff63c4a7375c,
it added wrapper to file-native. Do the same thing for
nativesdk-file.

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
sstate.bbclass: specify func dirs for sstate_hardcode_path

For some recipes that inhrient cmake, the ${B} may be removed by
cmake_do_configure() while sstate_hardcode_path() running, this
causes build errors:

  Exception: OSError: [Errno 2] No such file or directory: \
  '/path/to/build'

The function sstate_hardcode_path() called command:

  $SSTATE_SCAN_CMD which extended as "find ${SSTATE_BUILDDIR} ..."

So the proper function dirs could be ${SSTATE_BUILDDIR}.

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
sstate.bbclass: Fix up white space lost in last commit.

Commit e9672387 split one long line into a multi-line string, but in
the process white space between words was lost. This results in badly
formatted output when this message is printed.

Signed-off-by: Peter Urbanec <openembedded-devel@urbanec.net>
gnupg: CVE-2013-4242

GnuPG before 1.4.14, and Libgcrypt before 1.5.3 as used in GnuPG 2.0.x
and possibly other products, allows local users to obtain private RSA
keys via a cache side-channel attack involving the L3 cache, aka
Flush+Reload.

Patch from commit e2202ff2b704623efc6277fb5256e4e15bac5676 in
git://git.gnupg.org/libgcrypt.git

Signed-off-by: Yong Zhang <yong.zhang@windriver.com>
Signed-off-by: Kai Kang <kai.kang@windriver.com>
readline: Security Advisory - readline - CVE-2014-2524

The _rl_tropen function in util.c in GNU readline before 6.3 patch 3
allows local users to create or overwrite arbitrary files via a symlink
attack on a /var/tmp/rltrace.[PID] file.

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

Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
Signed-off-by: Kai Kang <kai.kang@windriver.com>
openssl: upgrade to 1.0.1j

Signed-off-by: Ross Burton <ross.burton@intel.com>
gnupg_1.4.7: add package config libusb

If build gnupg 1.4.7 after libusb-compat, it shows warning:

WARNING: QA Issue: gnupg rdepends on libusb-compat, but it isn't a build dependency? [build-deps]

Add package config libusb to fix it.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
mtools: fix broken /usr/bin/lz

When build fs with mtools-3.9.9, has file /usr/bin/lz in rootfs,
it is the symlink to uz:

root@qemu3:~# /usr/bin/lz
-sh: /usr/bin/lz: No such file or directory
$root@qemu3:~# ls -l /usr/bin/lz
lrwxrwxrwx 1 root root 2 Jul 18 18:07 /usr/bin/lz -> uz
root@qemu3:~# uz
-sh: uz: command not found

But the uz isn't actually exist, so the result is that lz is a
broken symlink.

The root cause is that uz hasn't been installed when install-scripts.

Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
gst-ffmpeg: Security Advisory - ffmpeg - CVE-2013-4358

libavcodec/h264.c in FFmpeg before 0.11.4 allows remote attackers to
cause a denial of service (crash) via vectors related to alternating bit
depths in H.264 data.

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

Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
gst-ffmpeg: Security Advisory - ffmpeg - CVE-2013-0869

The field_end function in libavcodec/h264.c in FFmpeg before 1.1.2
allows remote attackers to have an unspecified impact via crafted H.264
data, related to an SPS and slice mismatch and an out-of-bounds array
access.

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

Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
build-appliance-image: Update to dizzy head revision

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
systemd: Use ${ROOT_HOME} instead of /root

systemd avoids using nss lookups for the root user, so
naturally it assumes that root's home directory is /root.
In OE that's not the case, and it can lead to long delays when
shutting down due to user shutdown unit failures.

Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
Signed-off-by: Ross Burton <ross.burton@intel.com>
python-smartpm: Add checking for "rpm-ignoresize" option

The do_rootfs takes a very long time when build host has mounted many NFS
devices. syscall lstat() was being called on every filesystem mounted on the
build host during building.
The reason for the lstat() is that rpm is verifying that enough free disk space
is available to do the install. However, since the install is into the target
rootfs it should not matter how much free space there is in the host mounts.
Add checking for "rpm-ignoresize", by it, smart can make whether RPM skip
checking for diskspace when install a rpm package.

Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
nfs-utils: fix a Gcc undefined behavior

Calling strncpy with NULL second argument, even when the size is 0,
is undefined behavior, which leads to GCC to drop the check old
variable with NULL in following code.

https://bugzilla.yoctoproject.org/show_bug.cgi?id=6743

Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
liburcu: revert ARM GCC blacklist commit

This fixes the following error when building liburcu:
"Your gcc version produces clobbered frame accesses"

OE-Core is using a patched GCC 4.8.2 which is able to compile liburcu
properly.

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
libtool: Extend fix-final-rpath.patch

When building upower from meta-oe, the following QA error occurred:
ERROR: QA Issue: package upower contains bad RPATH

It appears to have been caused by one of the cases fix-final-rpath.patch
is meant to address but missed. So this change fixes the additional case
that was causing upower to have the QA error.

Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
default-versions.inc: match version of db and db-native while "AGPL-3.0" in ${INCOMPATIBLE_LICENSE}

The db 6.0.30's LICENSE is 'AGPL-3.0', and db 5.3.28 LICENSE is
'Sleepycat'

While building rpm image with "AGPL-3.0" in ${INCOMPATIBLE_LICENSE},
db 6.0.30 and db-native 5.3.28 were built, the different versions
caused the rpm doesn't work on target.

...
root@qemux86-64:~# rpm -qa
|rpmdb: BDB2531 Unacceptable log file /var/lib/rpm/./log/log.0000000001:
unsupported log version 21
|rpmdb: BDB2527 Invalid log file: log.0000000001: Invalid argument
|rpmdb: BDB0061 PANIC: Invalid argument
|==> rpmdbe_event_notify(0x623f40, PANIC(0), 0x7fffee0fbc0c) app_private
(nil)
|rpmdb: BDB1546 unable to join the environment
|error: db_init:tmp/work/core2-64-poky-linux/rpm/5.4.14-r0/rpm-5.4.14/
rpmdb/db3.c:1144: dbenv->open(-30973): BDB0087 DB_RUNRECOVERY: Fatal
error, run database recovery
...

[YOCTO #6858]

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>