[sdk-manage] Allow sdk-manage to be used by platform sdk

Signed-off-by: David Greaves <david.greaves@jollamobile.com>
[mer-sdk-chroot] Document the bind mounts and allow home to be shared - useful for setting up an ubuntu chroot inside the SDK for android building

Signed-off-by: David Greaves <david.greaves@jollamobile.com>
[mer-sdk-chroot] pass SSH_AGENT_PID and SSH_AUTH_SOCK through to the sdk

Signed-off-by: David Greaves <david@dgreaves.com>
[mer-sdk-chroot] no longer need an active_chroot_list

Signed-off-by: David Greaves <david@dgreaves.com>
[mb2] Add installdeps target to "zypper ref" + install build-deps
[mb2] Add support for build -j option

Giving -j option to mb2 build will set the build concurrency to
the set value. Otherwise all available CPUs are used for the build.

mb - changed the -j option to set %{_smp_mflags} instead of %{jobs}

Signed-off-by: Juha Kallioinen <juha.kallioinen@jollamobile.com>
Signed-off-by: David Greaves <david.greaves@jolla.com>
[mb2] Fixup help
[mb2] Replace grep, sed usage with rpmspec

This makes sure all macros are correctly expanded, and
all .spec formats that are supported by RPM can be parsed.

https://wiki.merproject.org/wiki/Packaging_guidelines/ParsingSpecFiles
[mb2] deal with submodule/subtree spec files

we must first cd to the directory in build/install steps before we try do
anything.
[mb2] Modify submodule/subtree spec dealings

mb2 will now parse simple spec %{tags} from the %setup line for
the subtree name. It is still probably a good idea to not use
rpm macros in the spec setup line.

The changedir to the subtree is done in a subshell with the sb2
command.

Signed-off-by: Juha Kallioinen <juha.kallioinen@jollamobile.com>
[mb2] Add support for build -j option

Giving -j option to mb2 build will set the build concurrency to
the set value. Otherwise all available CPUs are used for the build.

mb - changed the -j option to set %{_smp_mflags} instead of %{jobs}

Signed-off-by: Juha Kallioinen <juha.kallioinen@jollamobile.com>
[mb2] Handle directory names with spaces

Signed-off-by: Juha Kallioinen <juha.kallioinen@jollamobile.com>
[mb2] Disable ANSI colors from specify output

Signed-off-by: Juha Kallioinen <juha.kallioinen@jollamobile.com>
[mb2] Remove ssu register status check

Reason for the check was that zypper refresh would hang if
ssu register had not been done and the rpm repository requires
authentication.

With a fixed libzypp this is no longer the case and zypper will
just fail, but not cause a hang.

Signed-off-by: Juha Kallioinen <juha.kallioinen@jollamobile.com>
[mb2] Deploy also using pkcon

Signed-off-by: Juha Kallioinen <juha.kallioinen@jolla.com>
[mb2] Improve deploy error handling

Signed-off-by: Juha Kallioinen <juha.kallioinen@jolla.com>
[mb2] Clean RPMS directory before creating new rpms

Signed-off-by: Juha Kallioinen <juha.kallioinen@jolla.com>
[mb2] Do deploy as user with --pkcon option

Signed-off-by: Juha Kallioinen <juha.kallioinen@jolla.com>
[mb2] Allow spaces in device names

Signed-off-by: Juha Kallioinen <juha.kallioinen@jolla.com>
[mb2] Fix passing whitespace in rpmbuild define arguments

Signed-off-by: Juha Kallioinen <juha.kallioinen@jolla.com>