[SailfishDevel] Installing packages to the SDK and Emulator via the rpm/yaml file

Jarko Vihriala jarko.vihriala at jolla.com
Tue Oct 29 21:56:12 UTC 2013

Hello Chrispher, I'll inline some comments with "JV:"
From: devel-bounces at lists.sailfishos.org [devel-bounces at lists.sailfishos.org] on behalf of christopher.lamb at thurweb.ch [christopher.lamb at thurweb.ch]
Sent: Monday, October 28, 2013 11:32 PM
To: devel at lists.sailfishos.org
Subject: [SailfishDevel] Installing packages to the SDK and Emulator via the    rpm/yaml file

Hi all

Until recently when I needed extra packages on the SDK and Emulator
installed using the SDK Control Center (for the SDK) and zypper (for
the Emulator).

However from previous posts in this forum I gathered that it was also
possible to do the same using an app's yaml and spec files, both of
which are in the rpm directory.

I have had some success at getting this to work by trial and error,
but don't yet fully understand it.  The process is quite possibly well
documented somewhere, but if so, I have not yet succeeded in finding
the docus!

it is also possible that the whole thing is blinding obviously, and it
will suddenly go click ?.

So far I have established that:

1) The yaml / spec install process only works with "Deploy as RPM"

JV:Yes, this is correct. All dedendecies that application has, must be installed to device via rpm packaging. You should never assume that there is something there, because one day it might be changed or removed. But if your rpm spec has the right stuff in, you can be sure that if it buids, it's very likely to install and run as well.

2) The spec file is auto-generated based on the yaml file, so it is
the yaml file that we should be configuring. (the yaml file refers to
the format rather than what it does).

JV:Correct again. In our SDK there is a Yaml editor for making the things easy. Spec gets generated from Yaml. Spec itself has sections that are safe to tune. If you write stuff _outside_ those areas (marked with >> and <<) and modify yaml -> changes in spec are lost.

3) Within the yaml file there are 3 sections to which packages may be
added: PkgConfigBR:,  PkgBR:, and Requires:

JV:PkgConfigBR and PkgBR do the same, but PkgConfigBR queries the real name from pkg-config. They both install what is needed to compile and link the application, i.e. build it. (BR = BuildRequires).

4) Requires: installs "stuff" to the Emulator.

JV:Correct, Requires: is a run-time dependencylist.

5) I think that PkgConfigBR: and PkBR: install things to the SDK, but
I have not worked out the difference. However the format of the
package names these two sections accept is different.

Then there is the question of exactly which package belongs where.
There are xxx-devel packages which I guess belong on the SDK, but not
on the Emulator; and qt5-declarative--xxx packages for QML which I
think are required on both. Not to mention the debug packages ?.

JV: xxx-devel packages go only to the build environment, never to the target itself.

It would be fantastic if someone who understands this well could
explain, perhaps with an example. Let's say we want to use the
QtPositioning 5.x functionality and will be using the QML elements.
What should be where in the app.yaml file?

JV: I'll take that up in upcoming SDK documentation works, we can improve there, thanks for the heads up.

thanks in advance


SailfishOS.org Devel mailing list

More information about the Devel mailing list