MeeGo Packaging and Compliance Guidelines

Printer-friendly version

Quick Overview

Here are the steps at a glance.

  1. Introduction
  2. Compliance 3.1.1 - Naming
  3. Compliance 3.1.2 - Dependencies
  4. Compliance 3.1.3 - Integration with RPM
  5. Compliance 3.1.4 - Layout in Filesystem
  6. Compliance 3.1.5 - Desktop Integration
  7. Compliance 3.2.1 - Compliant Application Executables
  8. Compliance 3.2.2 - Use of Implementation Dependent Instruction Sets
  9. Congratulations

Introduction

Before starting this article, you should take a look at the MeeGo Quality/Compliance Page. This section will introduce you to the compliance standard in detail for applications and devices. It will also describe how to setup the compliance tools so that you can test you're own application before submitting them to the AppUp store.

In this article, I will describe what you must do to create an RPM installation package that is MeeGo compliant and ready to submit to the AppUp store.

Here are the main points of compliance. For more information be sure to look at the compliance document.


Compliance Spec 3.1.1 Naming

An application package name shall begin with one of the owners' fully qualified domain names in lower case, in reverse order, and end with the application name (such as, com.companyname.appname).

This requirement is to help applications avoid naming clashes and makes sure that everyone who submits an application to the AppUp Store has a recognizable and marketable name for the installation file.


Compliance Spec 3.1.2 Dependencies

Application packages SHALL “require” (in RPM terminology) all system components that are necessary for them to run. They MAY omit optional dependencies, if such omission does not affect ability of the application to operate in a user friendly way, that is, omitting a dependency should not have the effect of allowing the application to install successfully, but then not operate correctly. Application packages MAY NOT depend on features outside this specification as this would affect the ability of the application to install.

Dependencies on system components are allowed either in terms of package names or in terms of features.

The RPM package format allows the developer/packager to specify other RPM packages as installation dependencies. This requirement simply states that if you need other packages to be installed for your applications to run then you must require them. The second to last sentence is a very important one. Allow me to restate it.

Application packages MAY NOT depend on features outside this specification (referring to the Compliance Specification) as this would affect the ability of the application to install.

This means that if you have installation dependencies, you need to know whether they are part of the packages specified by the MeeGo compliance spec. If they are part of the specification then they will be present on any MeeGo compliant device and you can simply require them in the RPM. If the third party package that you need is not specified in the compliance specification, then you need to bundle the third party library. This also means that third-party repositories are not allowed to be used by MeeGo compliant applications. Instead of using a third-party repository download the libraries and bundle them into your RPM.


Compliance Spec 3.1.3 Integration with RPM

Application packages shall be created so that the package management system knows which files are installed. Queries on the installed packages, using standard package management tools, shall work as expected.

Packages that install all files in a post install script are not compliant. The application shall uninstall cleanly, leaving the system in the state it was in prior to installation (excepting any user‐added files or configurations).

This client it simply means that installing and uninstalling should be done in the usual RPM manners, and what and uninstall is performed it should remove everything that came with it.

Here are some examples of how rpm should be able to use your install files.

Examples:

  • Find the package that a file belongs to: $ rpm –q –-file filename
  • List all files installed by a package: $ rpm –ql packagename

Compliance Spec 3.1.4 Layout in Filesystem

An application shall be installed to /opt/packagename/ and, if necessary to the /etc/opt/packagename/ and /var/opt/packagename/ directories. System wide configuration files shall be placed in the /etc/opt/packagename directory rather than directly in operate correctly. Variable data from a package, such as lock files, cached files, etc. shall be placed in the /var/opt/packagename directory rather than directly in /var, unless a specific location is necessary for the application or system to operate correctly. User specific files shall be stored in the ~/.config/packagename directory. The rationale for these rules is to avoid filename clashes between application packages and with system files, by defining portions of the filesystem certain to be unique to that application.

This requirements simply states that binaries, system configuration files, files such as lock files and cached files, and user specific files all have their appropriate directories.


Compliance Spec 3.1.5 Desktop Integration

A .desktop file shall be installed under /usr/share/applications, and contain values for at least the following fields: Name, Comment, [Exec or Link], Icon, Type, and Categories. The picture file specified in the Icon field of the .desktop file must be either SVG or PNG format. In the case of PNG format, the following sizes shall be provided: 16x16, 32x32, 64x64, and 128x128.

The first part of this requirement states that you must create .desktop file for your application. A .desktop file stores details about how an application is to be launched, including the application name, environment variables, the location of the icon and more. The Desktop Entry Specification is maintained by freedesktop.org.

Here is a sample .desktop file in this case the .desktop file for the MeeGo-help application:

[Desktop Entry]

Version=1.0

Name=MeeGo Help

Comment=MeeGo Help Application

Type=Application

Icon=moblin-logo-icon

Terminal=false

Exec=MeeGo-help

Categories=Utility;

The second part of this requirement states the sizes of icons that must be provided with the application.


Compliance 3.2.1 Compliant Application Executables

All MeeGo compliant binary executable files and shared libraries shall be in the ELF format, as described in section 2.4.1. They shall import external interfaces only from the following sources:

  • shared libraries supplied as a part of the application package
  • MeeGo Core shared libraries, if the interface is a part of the public interfaces of that library

Additionally, the executable may use public interfaces from shared libraries specific to a MeeGo profile, but, in this case, the application will be compliant only with that profile.

If the executable is a plug‐in for a MeeGo system component, it may import interfaces from an executable of the system component, and from shared libraries loading as part of that executable.

This requirement again reiterates that a MeeGo compliant application must link only to MeeGo Core shared libraries. This is because these libraries are already installed on any device that is MeeGo compliant.

The statement that executables must be in ELF format refers only to application binary files. Scripting languages like Python, Perl, Ruby, etc ... are certainly acceptable.

MeeGo profiles, sometimes called "Verticals," are the combination of the MeeGo Core installation packages and a particular profiles' installation packages. The different profiles currently include MeeGo Netbook, MeeGo Tablet, MeeGo IVI (in-vehicle infotainment) and MeeGo Handset. If an application uses APIs that are provided by the MeeGo Tablet profile, for example, then this application will be compliant for tablets and not for the other profiles.

The last sentence of the section 3.2.1 mentions that if an application is built using components then linking to them is allowed by the MeeGo compliance guidelines


Compliance 3.2.2 Use of Implementation Dependent Instruction Sets

An application binary or shared library MAY use CPU architecture extensions and implementation specific features when building the binaries. If such usage would limit the portability of the application, the application must clearly identify the restrictions imposed as a result – application repositories/stores must be able to filter out devices which are not applicable. The mechanism for this is unspecified.

If you use CPU specific instruction sets, then you must state the restriction of your application.


Conclusion

We've taken a closer look at the particulars of the MeeGo compliance guidelines for applications and hopefully explained them in a clear manner. If there are any other questions about the compliance guidelines then take a look at these resources.


Power Management for upcoming MeeGo tablet devices introduces some additional recommendations. Please refer to the links below for more information on Power Management and changes required to the .desktop file to comply with this recommendation.
Power Management FAQs
Power Management - Desktop file entry











4.666665
Average: 4.7 (6 votes)

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Posted On : July 27, 2011 - 20:55
Michael Kasprzak's picture
Offline
Last seen: 25 weeks 2 days ago
 Brown Belt
Joined: Sep 23 2009
Points: 4856

Same problem as The Game Creators. I can't find out how to make my icon show up on the Meego Tablet UI. I found some mention of /usr/share/pixmaps to where to store the icon file, but the standard location of /usr/share/applications/ to store a .desktop file seems to have no effect.

Posted On : June 30, 2011 - 18:49
The Game Creators's picture
Offline
Last seen: 2 weeks 15 hours ago
 Black Belt (App Development) Brown Belt
Joined: Oct 7 2009
Points: 10357

I have followed the guidelines as best I can, and also used the rather excellent tutorial from this link (http://appdeveloper.intel.com/en-us/blog/2011/03/30/how-integrate-appup-...), and the RPM seems to be created fine and can be installed okay, but it does not show anywhere on the ExoPC 1.2 meego tablet applications screen. Any extra pointers on the steps to ensure the icon and app appear in the selection of applications. I quickly tried downloading Tic Tac Toe from the AppUp store, and that downloaded and installed fine, and showed in the application area (it crashed of course). If I can get my app showing, it would be a great step! Thanks for any assistance.

Posted On : May 3, 2011 - 05:14
Offline
Last seen: 37 weeks 2 days ago
 Green Belt
Joined: Dec 23 2010
Points: 305

Hi When i give target.path = /opt/com.mycompany

the files are not installing in this particular but installing in usr/local/bin

What shud be done to avoid this

Posted On : February 21, 2011 - 08:32
Offline
Last seen: 17 weeks 2 days ago
Joined: Jan 18 2011
Points: 310

Hi there,
I was wondering how if there's an example for 3.1.1 and 3.1.4,
While it's a good idea to have all files well organized, I don't know what exactly I need to do to have the package compatible across different platforms.

ad 3.1.1) If I just change the package name in .spec file would it be enough or I also need to change the whole application name to com.organization.application format?

ad. 3.1.4) do I need to worry about directories that are defined by function QDesktopServices::storageLocation(StandardLocation type); ?

What about the cleanup after uninstalling the app?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.