[Sugar-devel] Journal-like activities (was: Re: [ASLO] Release Read ETexts-19)
Aleksey Lim
alsroot at member.fsf.org
Thu Mar 18 12:00:44 EDT 2010
On Thu, Mar 18, 2010 at 11:07:04AM -0400, Martin Langhoff wrote:
> Hi James,
>
> I am very glad people are exploring alternatives around the Journal.
> Not sure what your goals are -- would be interesting to hear.
>
> Comments
>
> - I don't know how "pluggable" the Journal is, but I'd encourage
> working on patches to the Journal itself. I don't think a proper
> activity can take the role of the Journal, as it is pretty "special".
>
> - There's been interesting discussions around teaching the Journal
> about it's backup, which is on the XS (if there is one). An exciting
> idea bandied about was to do something inspired by Apple's Time
> Machine. I am happy to improve things on the XS side if needed.
>
> Aleksey is the current maintainer, he'll probably have suggestions ;-)
Well, I'm thinking more about having something like Journal toolkit to
make your-own-journal-for-minutes rather then plugins to journal.
So, current Journal could be split into not UI Shell (dbus)service,
that will handle all privileged operations like mounts, non-ds sources,
object chooser, etc and Journal activity(among others) that uses Shell.
(i.e. back to the future:)
In fact for Library-2 I'm planing something similar:
* Journal, construction kit, will incapsulate journal specific stuff
which is sugar core agnostic, will depend only on Shell dbus API and
ds dbus/fs api
* Shell service, I hope such dbus service will work in non root
environment
* Activity itself
>
> cheers,
>
>
> m
>
> On Thu, Mar 18, 2010 at 10:44 AM, James Simmons <nicestep at gmail.com> wrote:
> > Sascha,
> >
> > No need to apologize for a long email; this is interesting. I'm
> > thinking I'll start working on an improved version of Gabriel's Leer
> > Pen Drive and see where that takes me. I like the idea of the Journal
> > very much, but the implementation of the Journal Activity (if it's
> > correct to call it that) is not what I would like it to be.
> >
> > James Simmons
> >
> >
> > On Thu, Mar 18, 2010 at 8:09 AM, Sascha Silbe
> > <sascha-ml-ui-sugar-devel at silbe.org> wrote:
> >> On Wed, Mar 17, 2010 at 05:08:08PM -0500, James Simmons wrote:
> >>
> >>> I was looking at the code for Leer Pen Drive and thinking how I could
> >>> improve on it, and in the process I ended up looking at
> >>> git.sugarlabs.org at the code for Journal. Apparently that is not the
> >>> most recent code,
> >>
> >> I guess you were looking at the "journal" project (don't have internet
> >> access right now, so cannot check the exact name). That's indeed rather old
> >> code; the Journal has been integrated into the sugar package.
> >>
> >>> That wouldn't be too surprising except that the Journal Activity can write
> >>> to a USB or thumb drive. I couldn't figure out how or even where it was
> >>> doing it, [...]
> >>
> >> The "journal" project is part of 0.82. Back then the data store handled
> >> removable media.
> >> In 0.84+, the data store was rewritten from scratch [1] and only handles the
> >> on-disk, native Sugar objects. Handling of "traditional" (POSIX) file
> >> storage (USB sticks, hard disks, etc.) has been moved into the Journal.
> >> The code you're looking for is sugar/src/jarabe/journal/model.py. In there,
> >> the classes DatastoreResultSet and InplaceResultSet form an abstraction
> >> layer over the data store and mounted (POSIX) file systems.
> >>
> >>> but it does seem that you could write an Activity that does everything the
> >>> Journal does, from writing to mounted media to unmounting it.
> >>
> >> Almost everything the Journal does can be done in an activity as well. It
> >> all boils down to permissions; usually the permissions are based on security
> >> considerations.
> >> The following actions are implemented (source references are for 0.88):
> >>
> >> - show item in Journal (D-Bus API)
> >> - sugar/src/jarabe/journal/journalactivity.py
> >> - D-Bus doesn't allow a second process with the same service name, so not
> >> overridable
> >>
> >> - show object picker (D-Bus API)
> >> - sugar/src/jarabe/journal/journalactivity.py
> >> - again, D-Bus prevents activities from providing this
> >>
> >> - mounting/unmounting file systems (e.g. USB sticks)
> >> - show new mount points: sugar/src/jarabe/journal/volumestoolbar.py
> >> - unmounting: sugar/src/jarabe/view/palettes.py:VolumePalette
> >> - mounting (Frame, not Journal): sugar/extensions/deviceicon/volume.py
> >> - without Rainbow:
> >> - activities are able to mount and umount file systems using gio (resp.
> >> gvfs for older systems)
> >> - with Rainbow:
> >> - gio/gvfs probably refuses to unmount file systems mounted by the Frame
> >> from within activities (because the user ids are different)
> >>
> >> - browsing data store / file systems, reading all entries / files
> >> - sugar/src/jarabe/journal/model.py
> >> - without Rainbow:
> >> - unrestricted
> >> - with Rainbow:
> >> - currently:
> >> - data store access unrestricted
> >> - file system access prevented by gio/gvfs permission settings
> >> - future:
> >> - see P_DOCUMENT / P_DOCUMENT_RO Bitfrost [2] protections
> >>
> >> - reading a single data store entry / file via Object Picker
> >> - sugar-toolkit/src/sugar/graphics/objectchooser.py
> >> - unrestricted
> >>
> >> - writing a single data store entry / file (acquired via Object Picker)
> >> - without Rainbow:
> >> - unrestricted
> >> - with Rainbow:
> >> - currently:
> >> - data store access unrestricted
> >> - file system access prevented by gio/gvfs permission settings
> >> - future
> >> - unrestricted
> >>
> >> - writing random data store entries / files
> >> - without Rainbow:
> >> - unrestricted
> >> - with Rainbow:
> >> - currently:
> >> - data store access unrestricted
> >> - file system access prevented by gio/gvfs permission settings
> >> - future
> >> - subject to P_DOCUMENT Bitfrost [2] protection
> >>
> >>
> >> Bitfrost protections can be disabled, see the Bitfrost specs [2] for
> >> details.
> >>
> >> Sorry for the long mail; it's not just an answer to your questions but also
> >> a Rainbow TODO list. :)
> >>
> >>
> >> [1] http://wiki.sugarlabs.org/go/Development_Team/Datastore_Rewrite
> >> [2] http://dev.laptop.org/git/security/tree/bitfrost.txt
> >>
> >> CU Sascha
> >>
> >> --
> >> http://sascha.silbe.org/
> >> http://www.infra-silbe.de/
> >> -----BEGIN PGP SIGNATURE-----
> >> Version: GnuPG v1.4.10 (GNU/Linux)
> >>
> >> iQEcBAEBAgAGBQJLoiYRAAoJELpz82VMF3Dan24H/A9eXdL4OLzivkJf65mZLiUb
> >> IsHnMj7/n7zWAFSbuSWNQDdwXrhNhdoVzFQD6eNP9waV7vCYPw3UCMPLie7Qvo70
> >> HRetYCRtiJf9cAzvRGry1jddznzxknwzACFLxeqBP8LMvJDtPyc1qoyikAAuzOnw
> >> ehfpgY8U5X5k0i6RwqOUd0vZmkSjxrKslVEqwKoM30w1pTycK+sNngDOPCDe+ex3
> >> roU0FeyTXHTWWCqO9lN2CN+zbrArbolXLhAHvBVUlNUj0cu/sBN86tfXWktGKhql
> >> 4ewJeP3Ytl+sSh+w93bkRkNRvEirDZ6TK+B6xixhgkNZ/7r04sZs6Aj7Q4/a6/w=
> >> =nFrr
> >> -----END PGP SIGNATURE-----
> >>
> >>
> > _______________________________________________
> > Sugar-devel mailing list
> > Sugar-devel at lists.sugarlabs.org
> > http://lists.sugarlabs.org/listinfo/sugar-devel
> >
>
>
>
> --
> martin.langhoff at gmail.com
> martin at laptop.org -- School Server Architect
> - ask interesting questions
> - don't get distracted with shiny stuff - working code first
> - http://wiki.laptop.org/go/User:Martinlanghoff
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
--
Aleksey
More information about the Sugar-devel
mailing list