New push-helper hook is not supported

Bug #1346481 reported by Roberto Alsina
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Click Reviewers tools (obsolete)
Fix Released
High
Jamie Strandboge
qtcreator-plugin-ubuntu
Invalid
Undecided
Unassigned

Bug Description

When creating a click package with push notifications support, it needs to add a helper with its own hook and both the SDK and the click review tool get confused.

The manifest is something like this:

{
    "name": "com.ubuntu.developer.ralsina.hello",
    "description": "description of hello",
    "framework": "ubuntu-sdk-14.10-qml-dev2",
    "architecture": "all",
    "title": "hello",
    "hooks": {
        "hello": {
            "apparmor": "hello.json",
            "desktop": "hello.desktop"
        },
        "helloHelper": {
            "apparmor": "helloHelper-apparmor.json",
            "push-helper": "helloHelper.json"
        }
    },
    "version": "0.2",
    "maintainer": "Roberto Alsina <email address hidden>"
}

The click review tool will complain about missing desktop hooks for the push helper:

[15:59:18] <beuno> = hooks =
[15:59:18] <beuno> ERROR: could not find desktop hook for 'helloHelper'
[15:59:37] <beuno> "error": {
[15:59:38] <beuno> "lint_control_architecture_valid_contents": {
[15:59:38] <beuno> "text": "found binaries for architecture 'all': lib/i386-linux-gnu/hello/libhellobackend.so"
[15:59:40] <beuno> },
[15:59:43] <beuno> "lint_hooks": {
[15:59:45] <beuno> "text": "more than one app key specified in hooks"
[15:59:48] <beuno> }
[15:59:50] <beuno> },
[15:59:51] <beuno> ERROR: Could not load 'helloHelper-apparmor.json'. Is it properly formatted?

And the SDK will complain about "The manifest file needs to specify if this is a app or a scope"

These are the new files mentioned in the manifest:

ralsina@yoga:~/canonical/push-docs/hello$ cat helloHelper.json
{
    "exec": "helloHelper"
}

ralsina@yoga:~/canonical/push-docs/hello$ cat helloHelper-apparmor.json
{
    "policy_groups": [
        "push-notification-client"
    ],
    "policy_version": 1.2
}

Related branches

Revision history for this message
Roberto Alsina (ralsina) wrote :

The click in question

Revision history for this message
John Lenton (chipaca) wrote :

The click hook should have two entries: an "apparmor", and a "push-helper". The apparmor must include at a minimum the "push-notification-client" policy group. The json must have at least an "exec" key that should be relative to the json itself, and optionally an "app_id" key that must be the short id of one of the apps in the package if present.

Roberto Alsina (ralsina)
description: updated
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

From IRC:
14:47 < jdstrand> Chipaca: actually, I do have another question-- if app_id is
                  specified, should it be the click package name or the appname
                  (ie, the key to the hook database in the click manifest?)
14:47 < jdstrand> or something else?
14:47 < Chipaca> jdstrand: the "short id", ie unversioned app id, of one of the
                 apps in the package
14:47 < Chipaca> and
14:47 < Chipaca> ok, let me be clearer
14:48 < jdstrand> oh, so the APP_ID minus the version, ie <pkgname>_<appname>?
14:48 < Chipaca> jdstrand: if app_id is present, it must match
                 ${pkg}_${appname} of the app that has the desktop hook
14:48 < jdstrand> (assuming APP_ID is <pkgname>_<appname>_<version>)
14:48 < Chipaca> yes
14:48 < jdstrand> ok, thanks!
14:48 < jdstrand> I'll add checks for all that

Changed in click-reviewers-tools:
status: New → In Progress
assignee: nobody → Jamie Strandboge (jdstrand)
importance: Undecided → High
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Committed checks to trunk. This should be fixed in 0.8.

Changed in click-reviewers-tools:
status: In Progress → Fix Committed
Changed in click-reviewers-tools:
status: Fix Committed → Fix Released
Zoltan Balogh (bzoltan)
Changed in qtcreator-plugin-ubuntu:
status: New → Invalid
Revision history for this message
Roman Shchekin (mrqtros) wrote :

I can confirm this behavior. Seems that Qt Creator is confused too, must it be fixed or not?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.