Workaround for bug https://bugs.merproject.org/show_bug.cgi?id=555

Signed-off-by: David Greaves <david@dgreaves.com>
Move the rsync/overlay actions prior to any 2nd stage (they are useful for sb2 and probably lxc)

Signed-off-by: David Greaves <david@dgreaves.com>
Pass the RSYNCDONE flag to the 2nd stage

Signed-off-by: David Greaves <david@dgreaves.com>
Pass the SKIP_PREP flag to the 2nd stage

Signed-off-by: David Greaves <david@dgreaves.com>
We rsync to the BUILD_ROOT not the BUILD_TARGET

Signed-off-by: David Greaves <david@dgreaves.com>
Add support for a build.script for spec/rpm builds too

Note that rpm builds run from / whereas debian builds run from $TOPDIR/BUILD
This allows all kinds of useful trickery to produce and publish rpms.

Signed-off-by: David Greaves <david.greaves@jollamobile.com>
Pass additional variables to sb2 build even if VM_TYPE is not sb2.

This can happen when building with sb2 using kvm virtualisation.
In this case VM_TYPE variable will be equal to "kvm",
so we detect sb2 build by presence of BUILD_SB2FLAGS non-empty variable.

Signed-off-by: Oleg Girko <oleg.girko@jolla.com>
Fix permissions of dev files in buildsystem with chmod.

This is needed for Fedora where mknod doesn't set required permissions
for some reason.

Signed-off-by: Oleg Girko <oleg.girko@jolla.com>