View Single Post
Old 10-27-2010, 01:44 PM   #16
chaley
"chaley", not "charley"
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 5,259
Karma: 821512
Join Date: Jan 2010
Location: France
Device: Many android devices
Well, with great assistance from Kovid, I have this working (I think).

Rough outline of steps (on a debian system):

1) create a chrooted installation. Use debootstrap to build the one you want. I used squeeze.

For the next few steps, we are in the chrooted copy.

2) get the calibre binary. Untar it to /opt/calibre
3) run ./calibre-server. It should complain about missing libglib2.0-0. Install it.
4) run ./calibre-debug -c "import PyQt4.QtGui". It will complain about missing libraries, one by one. On my system,they were libx11-6, libxext6, libfreetype6, libSM6, libXrender1, libXrandr2, libfontconfig. Keep going until it doesn't complain any more.
5) Run calibre-server. It will now complain about missing libraries. I had to give it libXt6, libltdl7, libgomp1, libdbus-1-3.
6) Ensure you have set up a timezone in the chrooted copy. Use dpkg-reconfigure tzdata. If you don't do this, you will get very strange exceptions complaining about timevalues being too large.

In a non-chrooted copy ...

7) If necessary, set up a mount point so the chrooted system can see the library. Use mount bind. This is almost certainly necessary if you use dropbox. Change fstab if you wish to do the mount at boot time.
8) I also did mounts for /proc and for /sysfs because the chroot howto suggested it. I think that the /proc entry is necessary for networking, but I am not sure of sysfs.
9) Set up /etc/init.d/calibre-server. There is a prototype on mobileread. Change the paths as appropriate, and add the --chroot argument.
10) Set up the reverse proxy if you want it. I use it to get both SSL and better control over authentication.
chaley is offline   Reply With Quote