Scratch fails to write to Scratch.activity/Projects

Erik Garrison erik at laptop.org
Tue Aug 26 23:01:21 EDT 2008


On Tue, Aug 26, 2008 at 08:40:34PM -0400, John Maloney wrote:
> Hi, Scott.
> 
> What's wrong with just making the directory Scratch.activity/Projects  
> writable by the world? Seems to me that it could not hurt other  
> applications. Scratch does not run any binary files from that folder,  
> so it should be pretty safe. At worse, some malicious software could  
> write a bogus project file that Scratch would refuse to open.

I personally find this an acceptable solution.  However, in the present
moment we have our hands tied, as the olpc-configure script which runs
on first boot now chmod 755's all directories in /home/olpc.  This is
problematic when activity bundles are installed prior to the first boot,
as they are when we use a 'customization' usb key, as all directories
will lose the permissions set by the bundle creators.

Customization key description:
[http://wiki.laptop.org/go/Customization_key] Peru has moved to using
this method to install activities.  This is good for local system
customization, but it has caused this issue to rear its head.

> The Scratch activity used to install that way but I suppose something  
> about the installation process has changed.

Specifically:
http://dev.laptop.org/git?p=projects/olpc-utils;a=blob;f=olpc-configure;h=0d6ef55ed49635672d63ae79831bff2a2eea4143;hb=db05cda6b8f36fe833bfa8a201d2b5467afbbd94#l138

This code is run once on first-boot.

> Is there a Wiki page that explains how to use the bug database?

Somewhat.  http://wiki.laptop.org/go/Trac

> Feel free to re-package the current Scratch activity installer to  
> include your patch, if you think that makes sense.

I have taken the Scratch-6.xo which C. Scott initially provided and got
it to work on the XO as-is.  This involved dropping the wrapper code
mentioned in the ticket [http://dev.laptop.org/ticket/8166] and placing
it into Scratch.activity/bin/scratch-activity and symlinking the
Projects directory to /tmp/scratch.  A patch to the scratch-activity
script is attached to the ticket.  An activity bundle (with a lang=es
line in its Scratch.ini) is available at
[http://dev.laptop.org/~erik/activities/Scratch-6.es.xo].

Erik


> On Aug 26, 2008, at 6:36 PM, C. Scott Ananian wrote:
> > In http://dev.laptop.org/ticket/8166 there's a problem reported: Peru
> > can't save their work in Scratch, because Scratch tries to write to
> > Scratch.activity/Projects, and this is not writable.  Luckily, there
> > is an easy workaround: the directory $SUGAR_ACTIVITY_ROOT/data is
> > persistent storage which is writable by the activity, and properly
> > protected.  On the trac page I've also provided a patch which wraps
> > Scratch so that it writes to the proper place.
> >
> > Tomeu also volunteered on IRC earlier today to help you implement
> > proper Journal support for Scratch.
> >
> > Finally: there are a number of bugs filed against scratch in our bug
> > tracker, but it doesn't appear to have a proper component and owner
> > created for it in the tracker.  We'd like to fix that: do you have a
> > username on the dev.laptop.org trac instance that we could make the
> > default owner of bugs filed against 'scratch-activity' so that you are
> > promptly notified if/when people have problems?
> >
> > Thanks for porting scratch, the kids in Peru seem to really like  
> > it. ;-)
> > --scott
> >
> > -- 
> > ( http://cscott.net/ )
> 
> _______________________________________________
> Devel mailing list
> Devel at lists.laptop.org
> http://lists.laptop.org/listinfo/devel



More information about the Devel mailing list