Last updated 24.1.2023
rpm -q --queryformat='%{NAME}\n' -p <HARBOUR_APP_NAME>-1.0-1.<architecture>.rpmThat is what is set in .spec resp. .yaml file under "Name: "
No! We don't allow installation of files into /home/nemo from RPM. The user, the path for the home dir, or the user under which the app runs could change in future! It could also overwrite user data during an upgrade of the RPM package!
If you need a place to write files during run time: Please create a subfolder during run time named <HARBOUR_APP_NAME> inside a folder defined by the XDG Base Directory Specification (e.g. $XDG_CONFIG_HOME/<HARBOUR_APP_NAME>, see also the 'Naming' section above).
You could install them to /usr/share/<HARBOUR_APP_NAME>, and then just have a flag in $XDG_*_HOME/<HARBOUR_APP_NAME> if the user wants to disable the system-wide data. Of course, this doesn’t free the data, but in case hiding/not loading the data will improve e.g. the startup time or user experience.
Also, another thing: Having big pre-installed data in the app packaged (=inside the RPM) is bad, as it will require this data to be re-downloaded every time the package is installed, and (during installation time) will take up the space for the - temporarily downloaded - RPM and the extracted data (you will need ~400 MB free to extract a 200 MB RPM file with 200 MB of data inside, not taking into account compression and stuff).
So, you have an app plus some big data that probably doesn’t change as often as the code does
(either it changes more often or it doesn’t change as often - the data doesn’t usually have
anything to do with code updates to your app except if you happen to do some data format changes).
There are basically two options:
You most likely have your own libraries packaged to the RPM. Harbour RPM packages should not provide anything, also not own provided libraries. To exclude libraries from the 'Provides section', which you ship with your RPM, please add the following to the .spec file between the "# >> macros" and "# << macros".
# >> macros %define __provides_exclude_from ^%{_datadir}/.*$ # << macros
You most likely have your own libraries packaged to the RPM. Harbour RPM packages should not require any library which is not allowed (see allowed libraries below), also not own provided libraries. To exclude libraries from the 'Requires section', which you ship with your RPM, please add the following to the .spec file between the "# >> macros" and "# << macros". You have to specify each library name!
# >> macros # list here all the libraries your RPM installs %define __requires_exclude ^libFoo|libBar|libFooBar.*$ # << macros
Depending on the purpose, you should store files according to the XDG Base Directory Specification. You should append an organization name and an application name to the path. The organization name and the application name should be the same ones as you have defined in the .desktop file.
On Sailfish OS, the config, data and cache directories are used as follows:
You must not hardcode /home/nemo/ or $HOME/.config/, etc. - use the Qt 5 QStandardPaths, GLib convenience methods or the xdg-helper library to determine the paths. This will make sure your application keeps working for sandboxed use cases, multi-user use cases as well as multi-profile single-user use cases.
Version in Store | Update version | Comment |
---|---|---|
1.0-1 | 1.1-1 | OK |
1.0-1 | 1.0-4 | Not OK, just release is incremented |
1.0.1-7 | 1.0.2-1 | OK |
1.8.4-1 | 1.9.5-1 | OK |
1.6.3-1 | 1.6.3-8 | Not OK, just release is incremented |
1.7.8-1 | 1.1-1 | Not OK, update version is lower than version in Store |
Macros: %vendor %%fooThe extra % expands to nil string in case %foo does not exist. So the vendor will be empty and not set in that OBS project.
The uploaded RPM's 'Requires' are checked against the provided packages in different OS versions and a preliminary list of compatible OS versions is provided.
Note that this is only indication that the RPM is installable on the OS versions listed as compatible. It does not guarantee that the application will actually work, as there are currently some compatibility aspects which are not automatically detectable.
With the "From OS version" option you can select the lowest OS version your application is compatible with and available from the store.
But usually you don't need to set it and the the detected OS version compatibility is just fine. Only set it if you know that your application does not work on older versions.
Device type option will define on what type of devices your application will be available in the store. If you select "phone", it will be only available on phones. If you select "tablet" it will be only available on tablets. If you select both, or nothing, your application will be available on all types of devices.
Note that at the moment this is mainly about the screen size and scalability of your application's UI.
CPU Architecture for the Jolla phone is armv7hl and for the Jolla tablet i486. But the device type and CPU architecture are not in any way tied together. In the future there can be phones and tablets with different architectures, other types of devices, etc.
If your application contains compiled parts, it needs to be built for all the supported architectures. At the moment we support armv7hl and i486 architectures.
If you do not provide RPM for certain architecture, your application won't be available in store on devices with that architecture. E.g. if you only upload armv7hl RPM, your application won't be available for the Jolla tablet, even if you select "tablet" as a compatible device type.
If your application is architecture independet, i.e. pure QML or QML + python application, then you only need to upload one "noarch" RPM, which will then be available for all device architectures.
Android applications are also considered architecture independent and will be treated like "noarch" native applications.
If that is really the case, for example when your application depends on binary blob that is only available for certain architectures, then just note that in the "Message for QA".
This is needed for showing the best possible icon on different devices with different screen sizes and resolutions. If there is no icon with the appropriate size, the closest one is selected and scaled to fit the UI, which in case of upscaling can lead to rather ugly results.
Please note that:Older SDK versions contain a template which suggests a size of 90x90 and also a different install path. That is obsolete and not supported anymore.
/usr/share/icons/hicolor/<size>/apps/<HARBOUR_APP_NAME>.png
Where <size> is one of 86x86, 108x108, 128x128 or 172x172
Please note that:Older SDK versions contain a template which suggests a size of 90x90 and also a different install path. That is obsolete and not supported anymore.
And at the moment the RPM validator gives an error about the other icon sizes except 86x86. That can be ignored for now and the validator will be fixed in future SDK releases.
For Silica applications using C++ and QML
Exec=<HARBOUR_APP_NAME>
For QML-only Silica applications without an application binary
Exec=sailfish-qml <HARBOUR_APP_NAME>
You should have three fields there: OrganizationName, ApplicationName and Permissions. Additionally starting from Sailfish OS 4.5.0 you may have ExecDBus field.
OrganizationName and ApplicationName are used for determining the directory names used for storing application configuration, data and cache files. See above for more details on the directory names. The Permissions field is used for requesting permissions for your application. See Sailjail Permissions documentation for details, and a list of permissions which are allowed in Harbour.
[mersdk@SailfishSDK src]$ readelf -d <HARBOUR_APP_NAME> | grep RPATH 0x0000000f (RPATH) Library rpath: [/usr/share/<HARBOUR_APP_NAME>/lib] [mersdk@SailfishSDK src]$Also the 'RPM validator' which you can find in the Harbour Tools verifies the rpath and prints it out:
RPATH ===== OK [rpath in binary seems to be ok: '/usr/share/<HARBOUR_APP_NAME>/lib'] PASSED
QtGui in Qt 5 includes a number of classes to replace the QtOpenGL classes. In many cases, using the QtGui equivalents will just involve a renaming (QGL* -> QOpenGL*) and removing the linking against QtOpenGL. There are API changes involved in some cases, but these should not be too difficult.
Startup performance is better without using QtOpenGL, which is one reason we are disallowing it. This is due to its dependency on QtWidgets, which is quite a large library.
Library | Status |
---|---|
libsoup | Use libcurl instead (which is already supported in Harbour) - it's faster, more portable and has a better history of ABI stability: |
QtLocation | This Qt module is not yet stabilized in upstream Qt, we can therefore not guarantee a stable API. Once upstream Qt stabilizes the QtLocation API, it will be available for Harbour apps. |
GStreamer APIs and plug-ins | We are currently investigating the best way to support GStreamer API usage. Currently it is still lacking support for resource policies. Consider using QtMultimedia instead, which is already a supported API in Harbour, handles resource policies, and has C++ bindings as well as QML components ready to use. |
PackageKit D-Bus API | This API is not allowed to prevent unrequested sideloading. See "I want an 'RPM install' feature in my application..." question and "Why can't I use PackageKit's D-Bus API?" question below. |
Android APKs have two version attributes, 'android:versionCode' and 'android:versionName'. The versionCode is an integer value that is used to compare package versions and the versionName is a string that is used only for human presentation.
The only rule on android is that the versionCode needs to be incremented on each successive release of the application. See Android app versioning instructions
The android APKs submitted to Harbour are wrapped into RPM packages, so that they can be installed by the native Sailfish OS package management system. When the APK is wrapped in a RPM package it gets a version number in format
<android:versionName>-<android:versionCode>
This is bacause the RPM packaging system does not have a differentation between the human and machine readable versions. And this also means that Android applications submitted to Harbour need to follow both rules
signal path=/StoreClient; interface=com.jolla.jollastore; member=packageProgressChanged string "filename.rpm" int32 progress (0-100) signal path=/StoreClient; interface=com.jolla.jollastore; member=packageStatusChanged string "filename.rpm" int32 0 (not installed?), 1 (installed?) and 2 (progressing?) signal path=/StoreClient; interface=com.jolla.jollastore; member=packageError string "details"
Just edit the information on the application edit page and submit it to QA again. In these cases when you only change the store "assets", you don't need to reupload or touch the binary in any way. Changing the binary in any way, even reuploading the same package, will require it to go through the full set of QA tests and slows down the process.
If your submission got rejected because the binary was incorrectly marked as changed (there was a bug in Harbour binary change detection, or you accidentally deleted it and had to reupload it), then make a note in the "Message to QA" that this is an assets only change and resubmit.