libgcc: make sure symlinks are created in a valid directory

When adding extra symlinks, we have to make sure that the directory
that the links are created in is valid. Added a check for this.

This is an incremental addition to commit
97f2a81d6796ddaf7bbaab86c2ab9039673c732c

Signed-off-by: Alexandru-Cezar Sardan <alexandru.sardan@freescale.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
pango: Fix postinst by adding missing qemu-native dependency

* postinst_prologue calls qemu_run_binary but there is no
  dependency on qemu-native which causes postinst to sometimes
  fail which is fatal for building read-only rootfs

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
lib/oe: drop custom implementation of oe.path.relative

As we now require Python 2.7 and os.path.relpath() was added in 2.6 we can now
drop the reimplementation in oe.path.

oe.path.relative is simple now a wrapper that changes the order of the arguments
and it's use discouraged.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
gcc-cross: don't use oe.path.relative

Instead of using oe.path.relative, use the Python Standard Library function
os.path.relpath.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
perf: don't use oe.path.relative

Instead of using oe.path.relative, use the Python Standard Library function
os.path.relpath.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
rpcbind: add rpc user and run rpcbind daemon with rpc user

For security policy, change to run rpcbind daemon with rpc user
just like Redhat does, so set the --with-rpcuser to rpc and add rpc user.

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
nfs-utils: run rpc.statd as rpcuser:rpcuser instead of rpcuser:root

For security policy, change the group of running rpc.stdtd to rpcuser,
just like Radhat does.

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
consolekit: fix console-kit-log-system-start.service startup

console-kit-log-system-start.service fails to to start if the
/var/log/ConsoleKit directory does not exist. Normally it is created
automatically but as we mount a tmpfs at /var/log, we need to add
a tmpfiles.d entry to create it.

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
oe-selftest: optimize code in _sstatetests_noauto.py module

1) Some of the checks made when creating new directories are unnecessary beacause
the test will fail anyway if os.mkdir() fails, with the appropriate error message.

Removing this code.

2) Moved the adding to tracked paths for deletion of temporary build directories
and sstate-cache directories to after they are created. This makes more sense
and prevents deletion of these directories if they allready exist and may contain
useful data.

Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
oe-selftest: force some values in local.conf for _sstatetests_noauto.py

1) Some values should have default values in order for tests like sstate relocation to be relevant
   - SSTATE_DIR needs to have default value
   - SSTATE_MIRRORS need to be unset (we need the sstate files to be created)
   - TMPDIR needs to be in default location

2) Added conf/auto.conf to list of ported files to secondary build directories

Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
insane: check packages for absolute symlinks to the tmpdir

Add a sanity test that checks for symlinks in packages that point into the
TMPDIR on the host.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
scripts: add lnr (link relative)

lnr is a simple script to generate relative symlinks from absolute paths,
similar to "ln -r" but without requiring coreutils 8.16 (Ubuntu 12.04 and others
currently ship 8.13).

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
ncurses: use lnr instead of python code

Drop the use of custom Python code and instead use the new lnr script to
generate relative symlinks.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
grub-efi: use autotools-brokensep

Signed-off-by: Saul Wold <sgw@linux.intel.com>
dhcp-client: fix invoke dhclient-script failed on Read-only file system

In read-only file system, '/etc' is on the readonly partition,
and '/etc/resolv.conf' is symlinked to a separate writable
partition.

In this situation, we should use shell variable to instead of
the temp file '/etc/resolv.conf.dhclient'.

[YOCTO #5624]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>

Signed-off-by: Saul Wold <sgw@linux.intel.com>
package_manager.py: make list_installed() list pkg dependencies too

list_installed("deps") will now return the package dependencies.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
insane: Special case kernel modules for x32 targets

The Kernel module packages for x32 target have 64 bit binaries, which
breaks the QA_check expecting all the packages to be 32bit.

Make a special case for kernel module packages for x32 targets, to avoid
this false error.

Fixes Bug:
[YOCTO #5903]

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
package.py: use subprocess.Popen for rpmdeps call

* I've noticed errors like this in log.do_package:

  DEBUG: Executing python function package_do_filedeps
  sh: 1: Syntax error: "(" unexpected
  sh: 1: Syntax error: "(" unexpected
  DEBUG: Python function package_do_filedeps finished

  which are actually caused by some filenames included in package
  containing '()' characters

  Maybe we should change meta/classes/package.bbclass to
  fail when some filedeprunner call fails like this and fix
  filedeprunner to escape '()' and other possibly dangerous chars
  it's called like this:
  processed = list(pool.imap(oe.package.filedeprunner, pkglist))

* don't use shell=True
* show the command when it fails and let do_package task to fail

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
do_rootfs: Added PACKAGE_FEED_URIS functionality

Adding a common interface to add predefined package manager
channels to prebuilt rootfs:es.

Adding PACKAGE_FEED_URIS = "http://myre.po/repo/, will
assume repo directories named (rpm,ipk,deb) as subdirectories
and statically add them to the rootfs, using the same PKG_ARCHs
as the build which produced the images.

Tested with RPM, IPK and DEB.

deb feed functionality seem broken, is anyone using this ?

Signed-off-by: David Nyström <david.c.nystrom@gmail.com>
Signed-off-by: David Nyström <david.nystrom@enea.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
do_rootfs: Add PACKAGE_FEED_URIS as a vardep

A bit uncertain on where to put this, suggestions welcome.
Needed to automatically rebuild do_rootfs when PACKAGE_FEED_URIS
change.

Signed-off-by: David Nyström <david.c.nystrom@gmail.com>
Signed-off-by: David Nyström <david.nystrom@enea.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>