Firefox Sync Server

After getting a lot of trouble with the Xmarks sync on the quit old iceweasel that is installed on my desktop machine (Debian lenny), I decided to look for alternatives and found the firefox sync server. To run my own sync server I followed the installation instructions from mozilla and also some other nice guides available via websearch. Here are the basic steps:
get the necessary packages:
aptitude install python-dev mercurial sqlite3 python-virtualenv

Create a new user for the sync server using the apropriate commands and include www-data, the apache user, in the newly created group to give acces to the python script.

install the server from source:

$ hg clone https://hg.mozilla.org/services/server-full
$ cd server-full
$ make build

Create some directories as there are

  • data for the sqlite files – I will switch to mysql very soon
  • tmp for some temporary python files
  • logs just to keep the synchronisation logs seperate from the rest – I am not sure about access rights when writing directly to the logs directory

And now edit the configuration files:

$ vi sync.wsgi
[..]

os.environ['PYTHON_EGG_CACHE'] = '/path/to/tmp/python-eggs'

[..]

$ vi development.ini

[..]

[handler_syncserver_errors]
class = handlers.RotatingFileHandler
args = (‘/path/to/logs/sync-error.log’,)
[..]


$ vi etc/sync.conf

[..]

[storage]
backend = syncstorage.storage.sql.SQLStorage
sqluri = sqlite:////path/to/data/usersettings.db
[..]

[auth]
backend = services.auth.sql.SQLAuth
sqluri = sqlite:////path/to/data/usersettings.db

[..]

fallback_node = https:///
[..]

And finally add the directives for apache to access the wsgi interface:

WSGIProcessGroup ffsync
WSGIDaemonProcess ffsync user=ffsync group=ffsync processes=2 threads=25
WSGIPassAuthorization On
WSGIScriptAlias /ffsync /home/ffsync/server-full/sync.wsgi

Cups Print Server with remote printer driver

To enable remote printing on a print server first setup the server with the correct printer drivers. In my case I had to install foo2zjs package in order to get my printer running. My network printer was than configured using the cups webinterface as socket://:9100 which is quiet specific for my HP printer.
The remote printing must be configured using the following entries in cupsd.conf:

Listen ip of printserver:631
BrowseOrder Deny,Allow
BrowseAllow From local net/255.255.255.0

Order deny,allow
Deny From All
Allow From localnet /255.255.255.0

on the client side please add the following directive to cupsd.conf:

BrowsePoll ip of printserver :631

In newer versions of cups the directive must be placed in cups-browsed.conf. The directive itself remains the same.

Do not forget to start both servers in order to get the new directives working. On the client machine the remote printers should be available in the webinterface as newly added printers ready for jobs.

In newer versions do not forget to restart the cups-browsed service also.

Bootlog sheevaplug

[  296.577844] Restarting system.
þ
         __  __                      _ _
        |  /  | __ _ _ ____   _____| | |
        | |/| |/ _` | '__  / / _  | |
        | |  | | (_| | |    V /  __/ | |
        |_|  |_|__,_|_|    _/ ___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_
| | | |___|  _  / _  / _ | __|
| |_| |___| |_) | (_) | (_) | |_
 ___/    |____/ ___/ ___/ __|
 ** MARVELL BOARD: SHEEVA PLUG LE

U-Boot 1.1.4 (Jul 19 2009 - 16:03:28) Marvell version: 3.4.19

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CFB00

Soc: 88F6281 A0 (DDR2)
CPU running @ 1200Mhz L2 running @ 400Mhz
SysClock = 400Mhz , TClock = 200Mhz

DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000   size 256MB
DRAM CS[1] base 0x10000000   size 256MB
DRAM Total size 512MB  16bit width
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:512 MB
Flash:  0 kB

CPU : Marvell Feroceon (Rev 1)

Streaming disabled
Write allocate disabled

USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME], egiga1
Hit any key to stop autoboot:  3  2  1  0
SDHC found. Card desciption is:
Manufacturer:       0x1b, OEM "SM"
Product name:       "00000", revision 1.0
Serial number:      2982416674
Manufacturing date: 12/2008
CRC:                0x00, b0 = 0

5095986 bytes read

1426888 bytes read
## Booting image at 00400000 ...
   Image Name:   Debian kernel 2.6.32-trunk-kirkw
   Created:      2010-03-20  23:12:28 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1426824 Bytes =  1.4 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 00800000 ...
   Image Name:   Debian ramdisk 2.6.32-trunk-kirk
   Created:      2010-03-20  23:12:29 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    5095922 Bytes =  4.9 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 2.6.32-trunk-kirkwood (Debian 2.6.32-5) (ben@decadent.org.uk) (gcc version 4.3.4 (Debian 4.3.4-6) ) #1 Mon Jan 11 10:57:12 UTC 2010
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine: Marvell SheevaPlug Reference Board
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: console=ttyS0,115200
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 256MB 256MB = 512MB total
[    0.000000] Memory: 510208KB available (3504K code, 578K data, 120K init, 0K highmem)
[    0.000000] SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS:114
[    0.000000] Console: colour dummy device 80x30
[   21.474960] Calibrating delay loop... 1192.75 BogoMIPS (lpj=5963776)
[   21.714922] Security Framework initialized
[   21.714942] SELinux:  Disabled at boot.
[   21.714967] Mount-cache hash table entries: 512
[   21.715262] Initializing cgroup subsys ns
[   21.715277] Initializing cgroup subsys cpuacct
[   21.715287] Initializing cgroup subsys devices
[   21.715296] Initializing cgroup subsys freezer
[   21.715303] Initializing cgroup subsys net_cls
[   21.715346] CPU: Testing write buffer coherency: ok
[   21.716036] devtmpfs: initialized
[   21.717676] regulator: core version 0.5
[   21.717882] NET: Registered protocol family 16
[   21.718376] Kirkwood: MV88F6281-A0, TCLK=200000000.
[   21.718388] Feroceon L2: Enabling L2
[   21.718421] Feroceon L2: Cache support initialised.
[   21.720432] bio: create slab <bio-0> at 0
[   21.720694] vgaarb: loaded
[   21.721141] Switching to clocksource orion_clocksource
[   21.724778] NET: Registered protocol family 2
[   21.725070] IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
[   21.725817] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[   21.726169] TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
[   21.726348] TCP: Hash tables configured (established 16384 bind 16384)
[   21.726358] TCP reno registered
[   21.726507] NET: Registered protocol family 1
[   21.726675] Unpacking initramfs...
[   22.052100] Freeing initrd memory: 4976K
[   22.052191] NetWinder Floating Point Emulator V0.97 (double precision)
[   22.052434] audit: initializing netlink socket (disabled)
[   22.052484] type=2000 audit(0.570:1): initialized
[   22.058909] VFS: Disk quotas dquot_6.5.2
[   22.059172] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[   22.059264] JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[   22.059894] msgmni has been set to 1006
[   22.061527] alg: No test for stdrng (krng)
[   22.061645] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[   22.061658] io scheduler noop registered
[   22.061665] io scheduler anticipatory registered
[   22.061672] io scheduler deadline registered
[   22.061858] io scheduler cfq registered (default)
[   22.067756] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[   22.068200] serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
[   22.387771] console [ttyS0] enabled
[   22.391832] NAND device: Manufacturer ID: 0xad, Chip ID: 0xdc (Hynix NAND 512MiB 3,3V 8-bit)
[   22.400316] Scanning device for bad blocks
[   22.435580] Bad eraseblock 1064 at 0x000008500000
[   22.487249] Bad eraseblock 2671 at 0x000014de0000
[   22.492016] Bad eraseblock 2672 at 0x000014e00000
[   22.534774] Bad eraseblock 3974 at 0x00001f0c0000
[   22.543046] Creating 3 MTD partitions on "orion_nand":
[   22.548217] 0x000000000000-0x000000100000 : "u-boot"
[   22.553765] 0x000000100000-0x000000500000 : "uImage"
[   22.559209] 0x000000500000-0x000020000000 : "root"
[   22.565447] mice: PS/2 mouse device common for all mice
[   22.571039] rtc-mv rtc-mv: rtc core: registered rtc-mv as rtc0
[   22.576999] i2c /dev entries driver
[   22.580667] cpuidle: using governor ladder
[   22.584915] cpuidle: using governor menu
[   22.588946] Registered led device: plug:green:health
[   22.593995] mv_xor_shared mv_xor_shared.0: Marvell shared XOR driver
[   22.600390] mv_xor_shared mv_xor_shared.1: Marvell shared XOR driver
[   22.641203] mv_xor mv_xor.0: Marvell XOR: ( xor cpy )
[   22.681201] mv_xor mv_xor.1: Marvell XOR: ( xor fill cpy )
[   22.721201] mv_xor mv_xor.2: Marvell XOR: ( xor cpy )
[   22.761200] mv_xor mv_xor.3: Marvell XOR: ( xor fill cpy )
[   22.767859] TCP cubic registered
[   22.771105] NET: Registered protocol family 17
[   22.775918] registered taskstats version 1
[   22.780651] rtc-mv rtc-mv: setting system clock to 2010-03-27 20:04:14 UTC (1269720254)
[   22.788751] Freeing init memory: 120K
Loading, please wait...
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... [   23.322055] MV-643xx 10/100/1000 ethernet driver version 1.4
[   23.328000] mv643xx_eth smi: probed
[   23.372254] net eth0: port 0 with MAC address 00:50:43:01:68:8a
[   23.388502] usbcore: registered new interface driver usbfs
[   23.395214] mmc0: mvsdio driver initialized, lacking card detect (fall back to polling)
[   23.403411] usbcore: registered new interface driver hub
[   23.410349] usbcore: registered new device driver usb
[   23.429105] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   23.435740] orion-ehci orion-ehci.0: Marvell Orion EHCI
[   23.441057] orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
[   23.471187] orion-ehci orion-ehci.0: irq 19, io mem 0xf1050000
[   23.483781] mmc0: host does not support reading read-only switch. assuming write-enable.
[   23.491949] orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00
[   23.497949] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[   23.504791] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   23.512054] usb usb1: Product: Marvell Orion EHCI
[   23.516779] usb usb1: Manufacturer: Linux 2.6.32-trunk-kirkwood ehci_hcd
[   23.523519] usb usb1: SerialNumber: orion-ehci.0
[   23.528165] mmc0: new high speed SDHC card at address 0002
[   23.547108] mmcblk0: mmc0:0002 00000 3.81 GiB
[   23.551772]  mmcblk0: p1 p2 p3
[   23.555638] usb usb1: configuration #1 chosen from 1 choice
[   23.564011] hub 1-0:1.0: USB hub found
[   23.567813] hub 1-0:1.0: 1 port detected
done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
[   23.785569] kjournald starting.  Commit interval 5 seconds
[   23.791103] EXT3-fs: mounted filesystem with ordered data mode.
Begin: Running /scripts/local-bottom ... done.
done.
Begin: Running /scripts/init-bottom ... done.
[   23.891501] usb 1-1: new high speed USB device using orion-ehci and address 2

INIT: [   24.042701] usb 1-1: New USB device found, idVendor=0471, idProduct=085b
[   24.049434] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   24.056621] usb 1-1: Product: USB Memory Key
[   24.060907] usb 1-1: SerialNumber: dad30b02ebf5ce
version 2.86 boo[   24.066049] usb 1-1: configuration #1 chosen from 1 choice
ting

Starting the hotplug events dispatcher: udevd[   24.403178] udev: starting version 151
.
Synthesizing the initial hotplug events...done.
Waiting for /dev to be fully populated...[   24.884159] SCSI subsystem initialized
[   24.949031] Initializing USB Mass Storage driver...
[   24.954223] scsi0 : SCSI emulation for USB Mass Storage devices
[   24.960858] usbcore: registered new interface driver usb-storage
[   24.967405] USB Mass Storage support registered.
done.
Activating swap...[   25.152562] Adding 487864k swap on /dev/mmcblk0p2.  Priority:-1 extents:1 across:487864k SS
done.
Checking root file system...fsck from util-linux-ng 2.16.2
e2fsck 1.41.10 (10-Feb-2009)
root: clean, 21609/204000 files, 187422/815472 blocks
done.
[   26.110461] EXT3 FS on mmcblk0p3, internal journal
Cleaning up ifupdown....
Checking file systems...fsck from util-linux-ng 2.16.2
e2fsck 1.41.10 (10-Feb-2009)
/dev/mmcblk0p1: clean, 28/122880 files, 48189/245761 blocks
done.
Setting up networking....
Mounting local filesystems...