Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > iRex > iRex Developer's Corner

Notices

View Poll Results: Do you find this as a agreeable standard for the iLiad?
Yes 27 87.10%
No 4 12.90%
Voters: 31. You may not vote on this poll

Reply
 
Thread Tools Search this Thread
Old 04-29-2007, 12:16 PM   #31
Antartica
Evangelist
Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.
 
Antartica's Avatar
 
Posts: 423
Karma: 1517132
Join Date: Jun 2006
Location: Madrid, Spain
Device: quaderno, remarkable2, yotaphone2, prs950, iliad, onhandpc, newton
Until now, the greatest concern in this thread has been the fact that what happens when the card is removed.

I propose the following solution (inspired in the GoboSandbox that GoboLinux uses for package installation), that would make the database part of the card, and enable users to swap cards (and not reinstalling when you upgrade the firmware):

1. Don't use ipkg directly to install packages, but a script that wraps calls to ipkg so they're done in a sandbox, to ensure that (1) no part of the root filesystem is touched (2) all files are located in the card, (3) the package database is also in the card, and (4) sync is called after the package installation

2. The script would prepare a tmpfs with the desired structure, with a copy of ipkg and its libs, and several "mount --bind" to specific directories of the card (for /usr/local and for the pkg database), and a mount --bind to the durectory holding the pkg file

3. Then the script would call "chroot /tmp/sandbox /bin/ipkg install ..." to install the package, then do a sync

4. Finally, unmount all the "mount --bind"ed directories and the tmpfs filesystem.

And that would be all.

The copy of ipkg and its libs could be optimized doing a hard link of all the required files to a directory in the rootfs and mount --bind that, then it's only a matter of doing the neccessary symlinks in the tmpfs.

What do you think about it?

The only catch is that users would need to execute once a shell script to install in the rootfs all the needed components (and update er_registry...).

Nevertheless, this is somewhat convoluted, at least compared to the way of packaging programs in simple tarballs (again, please, go to gobolinux website and see how it's done there... http://www.gobolinux.org ). I speak a lot of gobo, but it's because is one of the two distros I use and know (the other one is Debian).

Last edited by Antartica; 04-29-2007 at 12:26 PM. Reason: minor correction
Antartica is offline   Reply With Quote
Old 04-30-2007, 06:13 AM   #32
nekokami
fruminous edugeek
nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.
 
nekokami's Avatar
 
Posts: 6,745
Karma: 551260
Join Date: Oct 2006
Location: Northeast US
Device: iPad, eBw 1150
Quote:
Originally Posted by Adam B.
Most people realize that once they install a new operating system that they have to reinstall all their programs. Why would they not assume as such when they upgrade the os on the iLiad?
Er... when I upgrade Solaris or MacOSX I usually don't have to reinstall software. Particularly for "dot" upgrades. I wasn't expecting to have to do this with the iLiad for an OS upgrade.

I'm certainly not trying to throw gasoline on the flames here, as I think this is a problem worth solving and I think (because I'm an optimist) that it is solvable. Let's just think it through a bit more.
nekokami is offline   Reply With Quote
Advert
Old 04-30-2007, 06:41 AM   #33
TadW
Uebermensch
TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.
 
TadW's Avatar
 
Posts: 2,583
Karma: 1094606
Join Date: Jul 2003
Location: Italy
Device: Kindle
If you upgrade Ubuntu or Debian, all your installed packages need to be reinstalled. Thanks to the Debian packaging system (aptitude/apt-get/dpkg), the upgrades will not randomly overwrite your config files but ask you what to do (skip/overwrite/edit). Does ipkg have a similar system in place?
TadW is offline   Reply With Quote
Old 04-30-2007, 07:40 AM   #34
Antartica
Evangelist
Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.
 
Antartica's Avatar
 
Posts: 423
Karma: 1517132
Join Date: Jun 2006
Location: Madrid, Spain
Device: quaderno, remarkable2, yotaphone2, prs950, iliad, onhandpc, newton
Quote:
Originally Posted by TadW
If you upgrade Ubuntu or Debian, all your installed packages need to be reinstalled. Thanks to the Debian packaging system (aptitude/apt-get/dpkg), the upgrades will not randomly overwrite your config files but ask you what to do (skip/overwrite/edit). Does ipkg have a similar system in place?
But the thing is that they're automatically reinstalled . That's the quid of upgrading the distribution, as Debian is more a collection of packages tuned to work together than a Base OS and independent applications with dependencies (the way is in OSX, Win an the BSDs).

As for the other question, yes, ipkg has a similar system in place ("ipkg update" "ipkg upgrade"). I've done that on OpenWRT systems to upgrade from one WhiteRusian version to the next without problems, and respected my additional installed packages. Background: OpenWRT is another of the distributions for embedded systems that use ipkg, this one geared to linksys routers (WRT54GL, ...) and workalikes.
Antartica is offline   Reply With Quote
Old 04-30-2007, 08:20 AM   #35
ali
Addict
ali doesn't litterali doesn't litter
 
ali's Avatar
 
Posts: 302
Karma: 116
Join Date: May 2006
Device: Iliad, dude!
Quote:
Originally Posted by TadW
If you upgrade Ubuntu or Debian, all your installed packages need to be reinstalled.[...]
Errr, what? The last times I did an "apt-get upgrade" or "apt-get dist-upgrade" it just reinstalled those packages that were actually upgraded, and I did not have to recompile or reinstall the stuff I have in /usr/local/.

To be precise: This is the mail reader I'm using:
Code:
>ls -l `which pine`
-rwxr-xr-x 1 root staff 9034445 2005-02-12 10:44 /usr/local/bin/pine
And my debian did many dist-upgrades since february 2005.


Actually, this is one of the reasons I love Debian in particular. When I talk to a poor chap who has to reinstall all his apps because he upgrades to Vista, or because he bought a new computer, or a new harddisk, or has a sluggish system because he installed to many stuff, I can lean back with a fat grin and say "Well, I never have to reinstall my stuff, because I use the good Linux".

Last edited by ali; 04-30-2007 at 08:27 AM.
ali is offline   Reply With Quote
Advert
Old 04-30-2007, 08:38 AM   #36
TadW
Uebermensch
TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.
 
TadW's Avatar
 
Posts: 2,583
Karma: 1094606
Join Date: Jul 2003
Location: Italy
Device: Kindle
Quote:
Originally Posted by ali
Errr, what? The last times I did an "apt-get upgrade" or "apt-get dist-upgrade" it just reinstalled those packages that were actually upgraded, and I did not have to recompile or reinstall the stuff I have in /usr/local/.
I did not talk about package upgrades, but about upgrades like from Debian 3.1 Sarge to Debian 4.0 Etch, or from Ubuntu Edgy to Ubuntu Feisty. You need to upgrade the packages to stay compatible with new library files etc.
TadW is offline   Reply With Quote
Old 04-30-2007, 08:39 AM   #37
ali
Addict
ali doesn't litterali doesn't litter
 
ali's Avatar
 
Posts: 302
Karma: 116
Join Date: May 2006
Device: Iliad, dude!
Quote:
Originally Posted by TadW
I did not talk about package upgrades, but about distri upgrades, e. g. upgrades like from Debian 3.1 Sarge to Debian 4.0 Etch, or from Ubuntu Edgy to Ubuntu Feisty.
Yeah, me too.
ali is offline   Reply With Quote
Old 04-30-2007, 08:40 AM   #38
TadW
Uebermensch
TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.
 
TadW's Avatar
 
Posts: 2,583
Karma: 1094606
Join Date: Jul 2003
Location: Italy
Device: Kindle
Quote:
Originally Posted by ali
Yeah, me too.
See what I added afterwards: You need to upgrade the packages to stay compatible with new library files etc.
TadW is offline   Reply With Quote
Old 04-30-2007, 08:44 AM   #39
TadW
Uebermensch
TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.
 
TadW's Avatar
 
Posts: 2,583
Karma: 1094606
Join Date: Jul 2003
Location: Italy
Device: Kindle
Quote:
Originally Posted by ali
Actually, this is one of the reasons I love Debian in particular. When I talk to a poor chap who has to reinstall all his apps because he upgrades to Vista, or because he bought a new computer, or a new harddisk, or has a sluggish system because he installed to many stuff, I can lean back with a fat grin and say "Well, I never have to reinstall my stuff, because I use the good Linux".
So you are saying when you upgrade from Sarge to Etch, you only need to upgrade the OS but not the packages?
TadW is offline   Reply With Quote
Old 04-30-2007, 09:05 AM   #40
ali
Addict
ali doesn't litterali doesn't litter
 
ali's Avatar
 
Posts: 302
Karma: 116
Join Date: May 2006
Device: Iliad, dude!
Quote:
Originally Posted by TadW
So you are saying when you upgrade from Sarge to Etch, you only need to upgrade the OS but not the packages?
Hm. The OS is in the packages, right? What you say is unintelligable to me. If I update a certain package, I have to update that package. That's obviously true. But I don't have to "reinstall" "all" other packages just because of an update.

I'm running debian testing since around 2004 and keeping it up-to-date using dist-upgrade, so my system went through multiple debian releases. And it very rarely happens that I have to update 3rd-party software manually, be it manually installed debs, stuff from 3d-party repositories or self-compiled software. I certainly do not "reinstall" anything. Thinking of it, I have to run "vmware-config.pl" after a kernel upgrade and run module-assistant for the wlan module. Is that "reinstalling"?
ali is offline   Reply With Quote
Old 04-30-2007, 09:06 AM   #41
Adam B.
Addicted to Porting
Adam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the roughAdam B. is a jewel in the rough
 
Adam B.'s Avatar
 
Posts: 1,697
Karma: 7194
Join Date: Oct 2006
Location: Indianapolis, IN
Device: iRex iLiad, Nokia 770, Samsung i760
In hindsight, I should have probably said "upgrade embedded firmware" instead of operating system...I know I have to reinstall all the packages when I upgrade my Nokia 770.

But perhaps a chrooted sandbox may be a better idea. It does seem like an awful lot of work though... Maybe something simpler? /mnt/settings remains unchanged throughout an upgrade right? Why not put the symlinks there?
Adam B. is offline   Reply With Quote
Old 04-30-2007, 09:44 AM   #42
TadW
Uebermensch
TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.
 
TadW's Avatar
 
Posts: 2,583
Karma: 1094606
Join Date: Jul 2003
Location: Italy
Device: Kindle
Quote:
Originally Posted by ali
Hm. The OS is in the packages, right? What you say is unintelligable to me. If I update a certain package, I have to update that package. That's obviously true. But I don't have to "reinstall" "all" other packages just because of an update.
What you are doing is just twisting words. Fact is, if you upgrade your Debian linux distribution, you have to upgrade the packages that you installed along with it - and NOT JUST the base packages that would qualify as the OS.

Quote:
I'm running debian testing since around 2004 and keeping it up-to-date using dist-upgrade, so my system went through multiple debian releases. And it very rarely happens that I have to update 3rd-party software manually, be it manually installed debs, stuff from 3d-party repositories or self-compiled software. I certainly do not "reinstall" anything. Thinking of it, I have to run "vmware-config.pl" after a kernel upgrade and run module-assistant for the wlan module. Is that "reinstalling"?
Our discussion here is not whether you have to upgrade manually or not, but whether an OS or firmware upgrade would require you to update/reinstall the packages - if this happens automatically through apt-get or aptitude, fine, but that's the whole point of this discussion - to use a packaging system for the iLiad that would reinstall the packages after installing a firmware upgrade.
TadW is offline   Reply With Quote
Old 04-30-2007, 09:49 AM   #43
TadW
Uebermensch
TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.TadW ought to be getting tired of karma fortunes by now.
 
TadW's Avatar
 
Posts: 2,583
Karma: 1094606
Join Date: Jul 2003
Location: Italy
Device: Kindle
Quote:
Originally Posted by ali
But I don't have to "reinstall" "all" other packages just because of an update.
Do you actually know how the dpkg system works internally? When you update you are essentially reinstalling the package.
TadW is offline   Reply With Quote
Old 04-30-2007, 10:05 AM   #44
Alexander Turcic
Fully Converged
Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.Alexander Turcic ought to be getting tired of karma fortunes by now.
 
Alexander Turcic's Avatar
 
Posts: 18,163
Karma: 14021202
Join Date: Oct 2002
Location: Switzerland
Device: Too many to count here.
Slighty OT: This site runs on Debian. But because the transition from Sarge -> Etch involved too many changes (i.e. updated packages with different config files), we decided to take the opportunity and configure a brand new server with Etch. The Wiki has been already moved, and in a couple of days we'll be able to move the forum as well.
Alexander Turcic is offline   Reply With Quote
Old 04-30-2007, 01:34 PM   #45
Antartica
Evangelist
Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.
 
Antartica's Avatar
 
Posts: 423
Karma: 1517132
Join Date: Jun 2006
Location: Madrid, Spain
Device: quaderno, remarkable2, yotaphone2, prs950, iliad, onhandpc, newton
Quote:
Originally Posted by Adam B.
But perhaps a chrooted sandbox may be a better idea. It does seem like an awful lot of work though... Maybe something simpler? /mnt/settings remains unchanged throughout an upgrade right? Why not put the symlinks there?
I'm unconvinced because of the convoluted of the solution. But it's not a lot of work, on the contrary, the script is rather simple (untested, is just an example):

Code:
#!/bin/sh
# Prepare the sandbox
mkdir /tmp/sandbox
mount -t tmpfs - /tmp/sandbox
mkdir -p /tmp/sandbox/usr/local /tmp/sandbox/bin /tmp/sandbox/lib /tmp/sandbox/card /tmp/sandbox/free
cp /bin/ipkg /tmp/sandbox/bin
cp /usr/lib/libipkg.so.0 /lib/libgcc_s.so.1 /lib/libc.so.0 /lib/ld-uClibc.so.0 /tmp/sandbox/lib
mount --bind /media/cf/ /tmp/sandbox/card
cd /tmp/sandbox/usr/local
for i in lib bin etc var share include home; do
   ln -s /card/_local/$i .
done
ln -s /card/Programs programs
mount --bind /mnt/free/ /tmp/sandbox/free
# call ipkg
chroot /tmp/sandbox /bin/ipkg install /free/$1
# umount the sandbox
umount /tmp/sandbox/free
umount /tmp/sandbox/card
umount /tmp/sandbox
Clearly, it's not overly complicated (nor rocket science). Beware: the paths I've used have been as I recall them, and the deps of ipkg are from OpenWRT, and I expect that it will need also tar and gzip to work.

So, coding it is not the difficult part. But... is it too convoluted?

Last edited by Antartica; 04-30-2007 at 01:39 PM. Reason: little fixes on the sample script
Antartica is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Proposed changes to Fair Use in copyright law llreader News 17 02-19-2010 05:17 AM
der standard newspaper on iliad harald iRex 4 01-17-2008 04:00 PM
Proposed MobileRead newsletter Karel iRex 17 11-27-2006 01:58 PM
e-book Packaging Question NatCh Legacy E-Book Devices 13 09-06-2006 12:02 PM
Proposed Solutions for Mobile Computing Bob Russell Lounge 5 10-24-2005 11:56 AM


All times are GMT -4. The time now is 09:40 PM.


MobileRead.com is a privately owned, operated and funded community.