September 25, 2011

mismael mismael
Lab Rat
79 posts

How to generate the Aegis file?

Page  
1

Hi all,

I am trying to deploy my harmattan application to QEMU but i always get the following errors

  1. libqtcontacts-tracker: engine.cpp:1280: Invalid credential string (TrackerReadAccess), errno (22) : Invalid argument
  2. libqtcontacts-tracker: engine.cpp:1280: Invalid credential string (TrackerWriteAccess), errno (22) : Invalid argument
  3. libqtcontacts-tracker: engine.cpp:1289: Entity does not possess required credential
  4. libqtcontacts-tracker: engine.cpp:1307:
  5. =============================================================================
  6. WARNING /!\ - MANDATORY SECURITY TOKENS ARE MISSIN
  7. =============================================================================
  8. Rejecting QContactLocalIdFetchRequest.
  9. Please add an AEGIS manifest to your package requesting the following
  10. security tokens: TrackerReadAccess, TrackerWriteAccess for /opt/FaceOff/bin/FaceOff [754].
  11. =============================================================================
  12. "Couldn't obtain a direct connection to the Tracker store: Error calling StartServiceByName for org.freedesktop.Tracker1: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process /usr/lib/tracker/tracker-store exited with status 1"
  13. libqtcontacts-tracker: sparqlresolver.cpp:123: Couldn't obtain a direct connection to the Tracker store: Error calling StartServiceByName for org.freedesktop.Tracker1: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process /usr/lib/tracker/tracker-store exited with status 1
  14. libqtcontacts-tracker: tasks.cpp:66: Cannot prefill resource cache with resources required by detail schemas

I know that there is missing credentials .

I tried to add theme manually but without any result.

  1. <aegis>
  2.     <request policy="add">
  3.         <credential name="TrackerReadAccess"/>
  4.         <credential name="TrackerWriteAccess"/>
  5.         <for path="/opt/FaceOff/bin/FaceOff"/>
  6.     </request>
  7. </aegis>

I want now to generate theme automatically, How can I do that?
note:- I am using windows 7, Qt SDK 1.1.3, QEMU nothing more than that
Thank you for your help.

20 replies

September 25, 2011

Alicemirror Alicemirror
Lab Rat
825 posts

Did you upgraded to the last Qt 4.7.4 and Qt Creator 2.3.0 ? This is important because the previouse Qt Creator version was having some bugs managing the packaging.

In this moment I don’t remember exactly but the aegis problem was depending by the Windows 7 and not by the development environement. I am sure of this. This is the same problem I had when tryed to compile the first applicaiton for Harmattan under Windows 7 + QEMU

This problems will disappear with Qt Creator 2.3.0

 Signature 

Enrico Miglino (aka Alicemirror)
Tech Consulting
Islas Baleares, Ibiza (Spain)
http://www.contesti.eu

September 25, 2011

mismael mismael
Lab Rat
79 posts

I am already using up to date version of Qt.

September 25, 2011

Alicemirror Alicemirror
Lab Rat
825 posts

Finally I remembered where I have found about aegis: http://www.developer.nokia.com/Community/Wiki/Harmattan:Developer_Library/Developing_for_Harmattan/Harmattan_security/Security_guide/Aegis_manifest_file_generation_tool

It is in the Harmattan section of developer.nokia.com not on the developer network. I think this link may be helpful for you.

 Signature 

Enrico Miglino (aka Alicemirror)
Tech Consulting
Islas Baleares, Ibiza (Spain)
http://www.contesti.eu

September 26, 2011

gri gri
Lab Rat
39 posts

You might also note to check if your “qtc_packaging/debian_harmattan/manifest.aegis” file still exists. The current Qt SDK has an error which deletes this file upon project opening: https://bugreports.qt.nokia.com/browse/QTCREATORBUG-6117

Also delete the _aegis file in your project directory and check if it gets re-generated when packaging. It should contain your manifest.aegis’ contents.

September 26, 2011

Alicemirror Alicemirror
Lab Rat
825 posts

@gri: this error IIRC was still present in Qt 4.7.3 It is not had been solved ?

 Signature 

Enrico Miglino (aka Alicemirror)
Tech Consulting
Islas Baleares, Ibiza (Spain)
http://www.contesti.eu

September 26, 2011

gri gri
Lab Rat
39 posts

It’s not a Qt bug. It’s QtCreator, which is 2.3.0 in the current QtSDK (1.1.3). See the bugreport’s date, it should be fixed in the next patch release. I have to “git checkout” my .aegis file on every project opening …

September 26, 2011

Alicemirror Alicemirror
Lab Rat
825 posts

I see. Thus there was another trouble that I don’t rememebr related to the aegis file also in the prevous version of Qt Creator. I meant Qt 4.7.4 and Qt 4.7.3 as the full SDK packages (including Qt Creator ).

 Signature 

Enrico Miglino (aka Alicemirror)
Tech Consulting
Islas Baleares, Ibiza (Spain)
http://www.contesti.eu

September 26, 2011

mismael mismael
Lab Rat
79 posts

Ok, it seems that there is a problem in the qt creator.

How can I generate the aegis file for the following libraries.

Contacts, SystemInfo, Multimedia, gallery

I think that when ever i changed the aegis file it will be cleared when i build the package using qt creator

Thank you for your help

September 26, 2011

gri gri
Lab Rat
39 posts

For a detailed list take a look here: http://harmattan-dev.nokia.com/docs/library/html/guide/html/Developer_Library_Developing_for_Harmattan_Harmattan_security_Security_guide_Harmattan_APIs_that_require_credentials.html

Create the manifest.aegis file your own in qtc_packaging/debian_harmattan and be prepared the file gets cleared. So store a copy of it somewhere or use a versioning system. Check the file contents before packaging :)

September 26, 2011

Alicemirror Alicemirror
Lab Rat
825 posts

Finally I remembered where I have found about aegis: http://www.developer.nokia.com/Community/Wiki/Harmattan:Developer_Library/Developing_for_Harmattan/Harmattan_security/Security_guide/Aegis_manifest_file_generation_tool

It is in the Harmattan section of developer.nokia.com not on the developer network. I think this link may be helpful for you.

@gri: It is the second time that someone of us tells it to @mismael :) Seems that we are discussing alone :D

 Signature 

Enrico Miglino (aka Alicemirror)
Tech Consulting
Islas Baleares, Ibiza (Spain)
http://www.contesti.eu

September 26, 2011

gri gri
Lab Rat
39 posts

The developer.nokia.com site is much older than the harmattan-dev site. It also contains no reference to the list of credentials and is less structured in my point of view :) So it is not the same for me.

Edit: Ok, I was wrong, it has detailed information but different :) So it’s better to look at both of them.

September 26, 2011

Alicemirror Alicemirror
Lab Rat
825 posts

@gri: the question was about the owner of this thread :) … I have seen your link for the first time today, nice! Thank you.

 Signature 

Enrico Miglino (aka Alicemirror)
Tech Consulting
Islas Baleares, Ibiza (Spain)
http://www.contesti.eu

September 26, 2011

mismael mismael
Lab Rat
79 posts

I tried to put the aegis file while qt creator packaging the application and i used the following credentials in it

  1. <aegis>
  2.    <request>
  3.       <credential name="TrackerReadAccess" />
  4.       <credential name="TrackerWriteAccess" />
  5.       <credential name="GRP::metadata-users" />
  6.       <credential name="GRP::pulse-access" />
  7.       <credential name="GRP::video" />
  8.       <credential name="mce::DeviceModeControl" />
  9.       <credential name="mce::TKLockControl" />
  10.       <for path="/usr/bin/userdatamanager" />
  11.    </request>
  12. </aegis>

but still the application does not execute because of the credentials.

September 26, 2011

gri gri
Lab Rat
39 posts

Do you run the application with debugger attached or without? On the N950 beta1 firmware, there was an error where the applications’ credentials are lost when running with debugger.

I don’t know exactly which version the emulator is running. If the application works without the debugger, this may be the same.

In this case you would need to:

  • Login as developer via ssh
  • Execute “cat /etc/passwd | grep developer” and see if you read /bin/sh or /bin/develsh
  • If there is /bin/sh, become root and open “/etc/shells” with an editor, add “/bin/develsh”
  • Become developer again and run “chsh”, choose “/bin/develsh”

September 26, 2011

mismael mismael
Lab Rat
79 posts

I am running the application in the release mode

Page  
1

  ‹‹ about algorithm render tachometer gauge on embedded catalog example and demo      Widget geometry problem ››

You must log in to post a reply. Not a member yet? Register here!