testing 8.2 using qemu

Michael Stone michael at laptop.org
Thu Sep 18 17:54:05 EDT 2008


On Thu, Sep 18, 2008 at 05:13:35PM -0300, Gabriel Eirea wrote:

Gabriel,

Thank you for your detailed and polite response.

>Thank you for the links. Actually I had already visited links 2 and 3
>doing a search on rainbow in the wiki. Unfortuantely I was unable to
>understand what rainbow means from an activity developer's point of
>view with the information shown there.

This is helpful; thanks. I have begun updating the [[Rainbow]] page to
better reflect its audience (which is much wider than it was when the
page was first created.)

>My situation is this: the activity reads a configuration file in a
>directory called datos/ that is part of the bundle (it gets installed
>in ~/Activities/conozco-uruguay.activity/datos). Apparently this is
>what is not working any longer. 

What evidence do you have for this diagnosis? 

I inquire because the log-file attached to #8334 indicates a different
problem to me which is that Rainbow's "check_bundle_id" assertion is
failing:

     293 def check_bundle_id(bundle_id):
     --> 294     assert bundle_id and all(s.isalnum() for s in bundle_id.split('.'))

     bundle_id = dbus.UTF8String('uy.edu.fing.geirea.conozco-uruguay')

because the activity bundle id contains a '-' character. The '-'
character is not permitted in activity bundle IDs by the DBus spec: 

   http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names

Try removing the '-' and see if you get further. (Note: you can find all
the code for checking these sorts of nits in the rainbow source code
here: (look for functions named check_*)

   http://dev.laptop.org/git?p=security;a=blob;f=rainbow/rainbow/inject.py;hb=HEAD

P.S. To read log files that have funny characters in them, run 

   cat /path/to/log

from a terminal.

>What I understood from the documentation is that the activity is run
>with a separate uid and gid so permissions may get in the way of proper
>file access. I don't understand why this happens given that the
>directory and the files are readable by everyone.

Your confusion seems justified to me -- I don't think file permissions
are tripping you up. (yet.)

>Second issue: a very simple question, what does
>$SUGAR_ACTIVITY_ROOT/data mean? and how can I put the configuration
>files there when I pack the bundle?

$SUGAR_ACTIVITY_ROOT means 'the value of the environment variable named
"SUGAR_ACTIVITY_ROOT"'. The concatenated '/data' part means "append the
string '/data' to the previous string." In python, you could perform
this operation as follows:

   import os
   print os.path.join(os.environ['SUGAR_ACTIVITY_ROOT'], 'data')

I believe that sugar's 'env' module provides some helper functions for
accomplishing this task.

-- Can you suggest a good place to record this tidbit where you might
have found it?

>I want to have a configuration file included in the bundle and then be
>able to read it when running the activity. This is a very basic thing
>and in my opinion should be clear in the documentation.

This is true.

>If you combine the following facts:
>1) there was a change in Sugar (apparently the introduction of
>rainbow) that broke an otherwise working activity,

Our timeframes may differ; did you start developing your activity before
http://lists.laptop.org/pipermail/sugar/2007-November/003725.html ?

>2) I was notified by Erik during Ceibal Jam, otherwise I would've
>never been aware of this,

I'm glad he pointed you in the right direction.

>3) there was no clear information on how to fix it, and

a) Did you have difficulty locating your activity's log file?
b) Did you have trouble reading the log?
c) Did you encounter other information which led you astray?

>4) the qemu images were not working 

OLPC cannot do everything -- have you considered finding some way to
keep the QEMU images in good working order?

> and I was unable to test 8.2, it all adds up to a big frustration.

You do seem to have had cause.

>I'm concerned that this doesn't help create a strong developer
>community. 

Explain more please.

> It takes too much time and effort to find out how to do
>simple things.

Such as?

>Thank you for reading this,

Thank you for writing it. Seriously -- please keep writing about
problems you encounter -- it seems unlikely that they will ever be fixed
if you don't.

Regards,

Michael



More information about the Devel mailing list