Use [[ ]] and clearer tests

Signed-off-by: David Greaves <david.greaves@jollamobile.com>
rpm/ can be overridden by setting PKGDIR but defaults to rpm/

Signed-off-by: David Greaves <david@dgreaves.com>
Stop processing forwards and give error if invalid spec file path is given.

Signed-off-by: Marko Saukko <marko.saukko@jollamobile.com>
Check that Source0 line exists and give error if it doesn't.
Also accept source lines with Source: instead of Source0:.

Signed-off-by: Marko Saukko <marko.saukko@jollamobile.com>
QtCreator would like to know all about our targets so provide updateQtCreatorTargets

usage: updateQtCreatorTargets --name $target --target-xml /srv/mer/targets/target.xml
This will add/update the xml with qmake -query and gcc -dumpmachine data for $target

Signed-off-by: David Greaves <david.greaves@jollamobile.com>
Add --delete support to updateQtCreatorTargets

Signed-off-by: David Greaves <david.greaves@jollamobile.com>
Accelerate python only if explicitly requested

Python acceleration in sdk-build+pp mode requires that the environment
variable SBOX_REDIRECT_FORCE=/usr/bin/python is exported.

Add examples of conditionally accelerated program rules to sdk-build
and sdk-build+pp modes.

Signed-off-by: Juha Kallioinen <juha.kallioinen@jollamobile.com>
updateQtCreatorTargets: Handle a missing xml file by making a blank one

Signed-off-by: David Greaves <david.greaves@jollamobile.com>
sdk-manage: Run updateQtCreatorTargets as mersdk user so sb2 targets are properly visible

Signed-off-by: David Greaves <david.greaves@jollamobile.com>
sdk-manage: XML is associated with shared folder, not internal.

Signed-off-by: David Greaves <david.greaves@jollamobile.com>
updateQtCreatorTargets: XML key in QtCreator corrected to MerTarget.GccDumpMachine

Signed-off-by: David Greaves <david.greaves@jollamobile.com>
mb2: Add new mb2 code

Signed-off-by: David Greaves <david.greaves@jollamobile.com>
mb2: Correct sense of spec file test; correct typo in macro

Signed-off-by: David Greaves <david.greaves@jollamobile.com>
mb2: Require qtc_* macros to be defined

Signed-off-by: David Greaves <david.greaves@jollamobile.com>
mb2: Workaround rpmbuild not setting _builddir
use
  %{?qtc_builddir:%define _builddir %qtc_builddir}
in the spec file macro definitions

Signed-off-by: David Greaves <david.greaves@jollamobile.com>
updateQtCreatorTargets: Use cleaner xml format
<targets version="2">
<target name="">
  <output name="GccDumpMachine"></output>
  <output name="QmakeQuery"></output>
</target>
<target name="">
  <output name="GccDumpMachine"></output>
  <output name="QmakeQuery"></output>
</target>
</targets>

Signed-off-by: David Greaves <david.greaves@jollamobile.com>
sdk-version: fix --go to actually go when it's the sole argument

--go set UPDATE, but only INSTALL was checked when processing arguments
Make all mounts to be performed in a private namespace.

This makes mount and umount commands unnecessary because all mounts
are done in a private namespace during enter or exec phases.
Also, enter and exec commands are unnecessary as well because
action to be performed can be determined by presence of command name and args.
Hence, no action is needed to be specified;
the new command line syntax looks like this:
mer-sdk-chroot [command args...]

Signed-off-by: Oleg Girko <ol+mer@infoserver.ru>

Added some compatibility code so sdk mount/umount is an error and
sdk enter/exec still works

Modified-by: David Greaves <david@dgreaves.com>
Add services to support sdk engine internal lan

Signed-off-by: David Greaves <david.greaves@jollamobile.com>
Ensure spec is up-to-date with yaml

Signed-off-by: David Greaves <david.greaves@jollamobile.com>