Absolutely! libpnd is always scanning for changes using inotify, it doesn't matter where they come from.'OrR' said:You've probably already thought about this but you need to make sure that there is a way to rescan the SD card either automatically or manually even if it's not taken out and reinserted because in many cases the .pnd files will probably be downloaded directly from the browser on the handheld.
libpnd and related so far is not a big fancy crazy thing; not enough time for that, and don't want to overextend to introduce a lot of issues.. can grow it over time. That said, I am trying to show restraint in writing things so that is all fairly obvious in function and laid out pretty easily.. so that _people can extend it_. The source is all open, people can make patches and see about getting them in.'Dutch_Cap' said:@skeezix: Kudos for the design. It seems elegant, easy and powerful. I assume the scanner daemon is scriptable? I want to make it generate AppRun and .DirIcon files for ROX Filer.
Excellent!'Vimacs' said:Well, we cant prevent the user from removing the sd card at any possible time so we have to take care of it that way,
and haveing the users umount the card manually before ejecting the card would probably also be quite bothersome for many users.
'todd' said:Excellent!'Vimacs' said:Well, we cant prevent the user from removing the sd card at any possible time so we have to take care of it that way,
and haveing the users umount the card manually before ejecting the card would probably also be quite bothersome for many users.
If the hardware can't prevent an arbitrary removal of the SD card, the software ought to cope with the arbitrary removal of the SD card. (This is why Mac's didn't/don't have eject buttons for floppies or optical discs.) "Even windows users know..." except that many of my personal acquaintances know no such thing. If a system auto-mounts (as, for example, Ubuntu (Nautilus?) does much to my delight) then it ought to auto-unmount on disc removal. It seems like all that would be required is to write in atomic transactions just like any reasonable DB software. Always leaving the disc in a stable (or recoverable) state. I wonder whether some of the current fs's in the Linux ecosystem would be well-suited to such a use?
I might be going a little off-topic. But I wanted to say this plan (as outlined by Jeff) sounds great and I'm particularly impressed that you guys are planning to cope with arbitrary SD card removal. It makes tons of sense.
--Todd
You'd have to fsync after every change, which will kill performance. Maybe fsync after X seconds or something like that. Not guaranteed to not corrupt it (not possible to anyway), but reasonably safe.
Are you on drugs? The term "Root Kit" comes from *nix. E.g., root level access... a term that means nothing in Windows (admin level is what it is called there).'cb88' said:they don't make many root kits for linux
only download from the official tested repositories and you should be fine ... unless you are talking something more robust like package authentication
'skeezix' said:...
After advocating Unioned Filesystems to the death, basically beyond what is necessary and/or helpful to the community (http://www.gp32x.de/board/index.php?showtopic=46738]) I've decided that any "Other OS" is best put entirely on an SD card, and that a Union for packages is quite risky business. When updating the NAND, you risk breaking dependent apps on the SD card, as they are 100% unaware of any OS updates that occur (since they are not mounted at the time). If you guys believe it will work, then that is great. I think it is a very good way of doing things. However, I see some potential difficulties down the road that knowledgeable users will be able to take care of, but normal users may be unable to.
How will you assure synchronization between NAND and Union installed packages?
'AireTamStorm' said:How will you assure synchronization between NAND and Union installed packages?
Since I have no idea what the problem is, can you give an explicit example where the union thing being suggested would cause a problem and why?
'WizardStan' said:I'm not 100% clear on all the details, and haven't done the reading (I know, shame on me), but I think the gist of it is:'AireTamStorm' said:How will you assure synchronization between NAND and Union installed packages?
Since I have no idea what the problem is, can you give an explicit example where the union thing being suggested would cause a problem and why?
*** Assume the NAND side of the unioned mount is read-only, but the SD Card is read-write ***
1-Install a package and dependent libraries on a unioned filesystem shared across the NAND and SD card 1. (The files are written to the SD Card)
2-Remove SD card 1 and replace with SD card 2.
3-Install a package and dependent libraries on a unioned filesystem shared across the NAND and SD card 2.
4-For the sake of argument, let's assume that the second SD slot is taken up by another card, or that this process is repeated for a third SD card.
*** At this point, SD card 1 is no longer in the Pandora ***
5-Upgrade the system (including the libraries installed in steps 1 and 3, above -- oops, SD Card 1 isn't mounted, so those libraries aren't there!)
6-Remove SD card 2 and re-insert SD card 1.
7-Chaos ensues.
I can see this being a fairly significant problem, but again, I haven't done the research to see if there's an obvious solution.
Personally, I'm planning on getting around this by never removing one of the SD cards, and using an old-fashioned mount for most of the userspace directories (/home, /usr/lib, etc.. -- no, not /etc, just etc....). That way I don't have to worry about parity with the NAND -- it's all treated essentially as one filesystem (better hope I made backups ), similar to what AireTamStorm described, and no part of it is ever unmounted. I'd still have the second SD card swappable, and store media or ROMs on it. This method has its drawbacks, but its a simple solution to a very complex problem, and it meets my meager requirements.
That said, I'm very impressed with the work that's being done in this area and don't want to discourage anyone from giving it a try -- if all the bugs get ironed out, it'll be SWEET!
'skeezix' said:libpnd and related so far is not a big fancy crazy thing; not enough time for that, and don't want to overextend to introduce a lot of issues.. can grow it over time. That said, I am trying to show restraint in writing things so that is all fairly obvious in function and laid out pretty easily.. so that _people can extend it_. The source is all open, people can make patches and see about getting them in.'Dutch_Cap' said:@skeezix: Kudos for the design. It seems elegant, easy and powerful. I assume the scanner daemon is scriptable? I want to make it generate AppRun and .DirIcon files for ROX Filer.
ie: I'm trying to get trhe design 'half right', and the internals 'good enough to work'. Some of it is a cheap hack internally, but the design should stand up. The cheap stuff can get taken out and fixed up over time, without breaking the desing or interface, ideally. Even if the interface has to change, such is life.. but I/we do the best we can in the time we have
That said, libpnd is not purely my work; others have had the finger in. It would be unjust for me to take all the credit (or blame
And libpnd is a small piece of the system as a whole.
So are you saying the behaviour is hardcoded into the daemon? The way I would do it, if the daemon discovers a PXML file it runs a shell script, with the path to the PXML as an argument. This way the user could change the behaviour relatively easily, just edit the shell script. I kind of assumed you were doing something like that.