csync source code is online
I have released the source code of csync. csync is a user level file synchronizer to provide roaming home directories for Linux. The source code in an early state, but there is a complete prototype available.
Visit the homepage or the trac system for more information.
Novell Hack Week
The second Hack Week at Novell has started yesterday. I'm working together with Sven Schober on the rewrite of lomoco. lomoco is a library and a commandline tool to control Logitech mice under Linux. lomoco can configure vendor-specific options on Logitech USB mice (or dual-personality mice plugged into the USB port). All recent devices will be supported in future (e.g. the MX Air).
You can checkout the code with git:
git clone git://git.lomoco.org/lomoco.git lomoco
dovecot dspam plugin
I've found the dovecot dspam plugin and looked at the code. It forks and calls the dspam binary directly for every mail. I didn't like this behavior, so
I've migrated it to use libdspam and added support to configure it using variables in dovecot.conf.
This is the dovecot dspam plugin that watches a special folder, the SPAM folder. When the MTA delivers a message to the user, it'll first run it through the spam classifier. If it is classified as spam, it'll be delivered to the SPAM folder instead of the normal filtering file the user may have (maildrop, sieve). Now the user has everything classified as spam in his SPAM folder. Everything else wherever the users wants it.
This is not enough cause our spam scanner needs training. We'll occasionally have false positives and false negatives. Now this is the point where the dovecot dspam plugin comes into play. Instead of moving mail into special folders, the user has two actions available:
- moving it out of the SPAM folder and
- moving it into the SPAM folder.
The dovecot plugin watches these actions (and additionally prohibits APPENDs to the SPAM folder, more for technical reasons than others) and tells dspam that it made an error and needs to re-classify the message, depending on which of the two actions the user did. The user can now move the message directly into whatever folder the user chooses, and it all works.
*UPDATE*
Johannes has written a new plugin and we have merged pieces of the code, please check:
http://johannes.sipsolutions.net/Projects/dovecot-antispam
Qemu (kvm) internal network setup
I got a new notebook, a nice Thinkpad T61 with virtualization technology. I need to run some Windows system for development so I've decided to use the Kernel based Virtual Machine (KVM). The VMs should communicate over an internal network but should have access to the internet and I want access via network to them. So I setup a bridge with TUN/TAP devices masqueraded to my normal interface.
HOST QEMU GUEST1
+---------------+ +--------------+
| 10.10.5.158 | | |
LAN ---+---- eth0 | | |
| | | | QEMU GUEST2
| +------+ +--+---+---- nic0 | +--------------+
| | tap0---+ | |192.168.100.5 | | |
| | tap1---+ | +--------------+ | |
| +------+ | | | |
| br0 +--+----------------------+---- nic0 |
|192.168.100.254| |192.168.100.1 |
+---------------+ +--------------+
Needed packages:
tunctl (uml-utilities)
bridge-utilities
kvm
Setup the network:
Create a file call kvm-network with the following content and make it executeable.
#!/bin/bash
KVMNET_UID=1000
KVMNET_GID=$(grep kvm /etc/group | cut -d ':' -f 3)
# number of TUN/TAP devices to setup
NUM_OF_DEVICES=3
case $1 in
start)
modprobe kvm
modprobe kvm_intel
modprobe tun
echo "Setting up bridge device br0"
brctl addbr br0
ifconfig br0 192.168.100.254 netmask 255.255.255.0 up
for ((i=0; i < NUM_OF_DEVICES ; i++)); do
echo -n "Setting up "
tunctl -b -g ${KVMNET_GID} -t kvmnet$i
#tunctl -b -u ${KVMNET_UID} -t kvmnet$i
brctl addif br0 kvmnet$i
ifconfig kvmnet$i up 0.0.0.0 promisc
done
SuSEfirewall2 stop
SuSEfirewall2
;;
stop)
for ((i=0; i < NUM_OF_DEVICES ; i++)); do
ifconfig kvmnet$i down
brctl delif br0 kvmnet$i
tunctl -d kvmnet$i
done
ifconfig br0 down
brctl delbr br0
SuSEfirewall2 stop
SuSEfirewall2
rmmod kvm_intel
rmmod kvm
;;
*)
echo "Usage: $(basename $0) (start|stop)"
;;
esac
br0 is the gateway to the external network.
Setting up the firewall:
Edit /etc/sysconfig/SuSEfirewall and set the following variables:
FW_DEV_INT="br0 qtap0 qtap1 qtap2 qtap3 qtap4" FW_ROUTE="yes" FW_MASQUERADE="yes" FW_MASQ_NETS="192.168.100.0/24" FW_PROTECT_FROM_INT="no"
If you don't run a SUSE system use the following lines to setup masquerading:
echo "1" > /proc/sys/net/ipv4/ip_forward iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
On the guest you have to set the default gateway to 192.168.100.254 which is the bridge br0 and take a look in /etc/resolv.conf to get the name servers. I run a Windows 2003 Server as a guest which is the dhcp and name server for the other guests (Vista, several Linux installations).
Setting up qemu
Guest 1:
#!/bin/bash
qemu-kvm /path/to/vm.img \
-net nic,model=rtl8139,macaddr=52:54:00:12:34:56 \
-net tap,ifname=qtap0,script=no \
-m 256 \
-smp 1 \
-usb \
-usbdevice tablet \
-localtime
Guest 2:
#!/bin/bash
qemu-kvm /path/to/vm2.img \
-net nic,model=rtl8139,macaddr=52:54:00:12:34:57 \
-net tap,ifname=qtap1,script=no \
-m 256 \
-smp 1 \
-usb \
-usbdevice tablet \
-localtime
Note that the VMs have different MAC addresses. It took me a long time to find why I couldn't ping from one guest to another
By the way, one of the guests is running Vista, which runs smoothly on my machine with KVM.
lomoco – next generation
I've finished my diploma thesis (more about this later) and started to work on lomoco again. lomoco can configure vendor-specific options on Logitech USB mice (or dual-personality mice plugged into the USB port).
Since there are some places where you can find code to control Logitech mice, I decided to write a shared library. We will provide a command line client to configure your mouse. The shared library makes it possible to use it for example in KDE's kcontrol which has his own code for Logitech mice at the moment.
Some days ago Peter Feuerer (piie) was able to sniff the commands which have to be send to the G5 to change the resolution. With some already existing hiddev code, he was able to set the different resolution modes. The G5 has only 4 resolutions: 400, 800, 1600, 2000. The rest of the resolution you can select with the windows server is just interpolated! You can find the hack here. There is existing code for the MX610 and MX Revolution too.
You can find the lomoco homepage here.
WengoPhone 2.1rc1
WengoPhone 2.1rc1 has been released today. We migrated the build system to the CMake and added an abstraction layer called owbuild for WengoPhone. It compiles just fine under Linux, MacOSX and Windows on x86, x86_64 and ppc. The last weekend I have fixed a lot of problematic warnings to be sure it works just fine under x86_64 now.
Back to WengoPhone. It has some nice new features.
- Secure voice calls using AES 128 bit encryption (Wengo <--> Wengo)
- The ability to configure a SIP account on any SIP server
- Massive stability enhancement on Mac and Linux
- Several usability improvements
WengoPhone 2.1rc1 RPMs for openSUSE 10.2 are available at Packman, here.
If you have some problems with sound, install the portaudio package from Factory. You can get it here.
Please report bugs to the ticket system at: http://dev.openwengo.com/

Client Integration with Samba
At the beginning of October I started writing my diploma thesis at SUSE Linux in Nuernberg. I'll develop a library and a PAM module to synchronize the home directory from a Linux client to a Microsoft Windows ADS environment and back.
The main problem of this subject is to write a file synchronizer which works with the infrastructure we already have and acts like the Windows one. This means a client only file synchronizer which just uses libsmbclient and is as simple as the Windows "Merge Algorithm" used for Roaming Profiles since Windows 2000.

New Build Service Home
Hi,
the Build Service uses now Novell's iChain to authenticate the user. So my home project has changed to home:gladiac and I build now all packages against the KDE:Qt project. Update you configuration for the new URL.
By the way KVIrc 3.2.5 is availiable
CMake and WengoPhone
The last weeks I've started to work into CMake. CMake, the cross-platform, open-source make system. CMake is used to control the software compilation process using simple platform and compiler independent configuration files. If you're now asking which project for example is using CMake as make system, KDE4 and now WengoPhone.
WengoPhone is a GPL-licensed multi-platform softphone using Qt4. The next generation version of WengoPhone is under heavy development. They used scons for the make systems with some own classes. The problem of scons is, that it slows down the more files you have to handle. This was the reason at KDE4 why bksys was dropped too.
If you're a CMake developer or interested in CMake you can join #cmake @ irc.freenode.org. If you're looking for CMake Modules visit the CMake Modules Project.
konsole-256color
Since KDE 3.5.4 the konsole has 256 color support. You don't believe it? Test 256 color support in your terminal:
echo -e "\e[38;5;196mred\e[38;5;46mgreen\e[38;5;21mblue\e[0m"
If the words are displayed in the right colours, all is well.
Not you have 256 and you want to use it, sure. First we want vim with 256 colors! Goto the konsole configuration and set the TERM variable in the "Session" tab to xterm-256color. If you're using screen, then you have to add
term "screen-256color"
to your "screenrc"-file.
Maybe you recognize that your "ls" doesn't colorize the output anymore. The reason is that there is no entry for xterm-246color and screen-256color in /etc/DIR_COLORS.
The last problem I had to fix was the color bug with vim and screen. If vim has set a background color and you exit vim, your console still use the colors set by vim. It is a weird problem and currently I've fixed it with an autocmd:
autocmd VimLeave * :set term=screen
You can find a screenshot of my konsole with 256color vim here.