Archive for February 2010

toying around with OpenSync, Symbian (Nokia E65) and Funambol

Today (2010-02-24) I gave the current opensync a try and experimented a bit with my Nokia E65. Being rather disappointed by funambol since syncing with it drops all the numbers that are marked as “default” in any contact, I really wanted to know if this is a bug in the Symbian SyncML implementation or in Funambol. Continue reading ‘toying around with OpenSync, Symbian (Nokia E65) and Funambol’ »

if you *have* to run windows (ctd.)

here’s a nifty list of commands to start the relevant control-panel / mmc-plugins in wondiws (in german): MSC/CPL-Referenz

to e.g. run the printer control-panel, use this command:

control.exe printers

building “schroot” on RHEL-5.4

“schroot” is a secure chroot tool that allows a non-privileged user on a system to switch to a chroot in a secure manner. This can be used to set up automated builds etc. that don’t have to run as root.

Unfortunately, RedHat Enterprise doesn’t ship with schroot-packages, so here’s a way to build them: Continue reading ‘building “schroot” on RHEL-5.4’ »

cached: git-SVN: Whys And Hows (by amitu)

NOTE: this is just a copy of a blog-posting originally written by Amit Upadhyay. Since I found it really useful, I was rather disappointed to notice it has gone one day. Thankfully it still was in google’s cache, so I decided to make a copy. The rest of the article is a full-quote: Continue reading ‘cached: git-SVN: Whys And Hows (by amitu)’ »

calling native windows programs from cygwin with a sane path environment

some things fail if they’re called from within cygwin due to the path adjustments that are necessary for cygwin.

to call them with a sane (clean) windows-environment, do the following:

OLDPATH="$PATH"
export PATH="$(echo $PATH | tr ':' '\n' | grep /cygdrive | tr '\n' ':')"
 
call your windows tool here
 
export PATH="$OLDPATH"

VisualStudio linking error when re-compiling

Well, I don’t want to lose to many words about VisualStudio compared to any professionally acting development tool, but there seem to be (non-)surprisingly many people out there suffering from the same insane problem…

When re-compiling a project, with the intention of only processing those files that have been changed since the last run (or those depending on such files), the linker fails in a miserable way:

1>CVTRES : fatal error CVT1100: duplicate resource.  type:ICON, name:1, language:0x0409
1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt

As common when using tools from Redmond, the error message is of almost no real help, since it does not tell anything about the file(s) that caused this problem. BTW, you won’t find any more details in the oh-so-detailed build-log either…

Well, the relly bad problem here is the linker itself, who tries to incorporate a given icon file into the executable binary, and thus runs the visual studio resource compiler (“RC.EXE” iirc), which in turn terribly cries out noticing there is already a compiled resource file where it would like to create a new one so desperately… Having left you standing there in the rain, compilation fails. It doesn’t even consider to tell you which files conflict or simply override the old resource file.

To avoid this, navigate to the topmost folder in your destination tree, and look for files having a “.res“ suffix. Using a sane cygwin shell, simply do something like:

find | grep ".res$" | xargs rm -v

Having removed the .res-files, recompiling works like a charm. Well, I’m going home into the GNU-zoo now, enough of this annoyance…

install virtualbox in ubuntu

just a copy-paste list:

sudo sh -c 'echo "deb http://download.virtualbox.org/virtualbox/debian karmic non-free" >> /etc/apt/sources.list.d/virtualbox.list'
wget -q http://download.virtualbox.org/virtualbox/debian/sun_vbox.asc -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get install virtualbox-3.1

YAY, install cygwin-packages from the cmdline

Migrating a cygwin-installation to a new machine was a real PITA to me, since I always have to run the installer many many times to have all the tools I forgot in the previous runs. And this terrible way of having to search them by clicking through the whole package-tree…

Since cygwin-1.7 it is possible to install packages from the commandline, without a single mouseclick:

setup.exe -q -P wget,make,patchutils,psmisc,git,git-svn,bc

Now to get a ready-to-use list of installed packages on an existing cygwin-installation, have a look in /etc/setup/installed.db:

tail -n +2 /etc/setup/installed.db  | cut -d ' ' -f 1 | xargs echo | sed 's/ /,/g'

which yields the following packages on my current system:

alternatives autossh base-cygwin base-files base-passwd bash bash-completion bc binutils bzip2 cmake cogito colordiff coreutils corkscrew cpio crypt csih cvs cvsps cygrunsrv cygutils cygwin cygwin-doc dash ddrescue diffutils e2fsprogs editrights expat file findutils gawk gettext git git-completion git-gui git-svn gitk grep groff gzip httptunnel ipc-utils less libapr1 libaprutil1 libbz2_1 libcurl4 libdb4.2 libdb4.5 libexpat1 libexpat1-devel libgcc1 libgdbm4 libgmp3 libiconv2 libidn11 libintl2 libintl3 libintl8 liblzma1 libncurses8 libncurses9 libneon27 libopenldap2_3_0 libpcre0 libpopt0 libpq5 libreadline6 libreadline7 libsasl2 libserf0_0 libsqlite3_0 libssh2_1 libssp0 libstdc++6 libwrap0 login make man minires multitail ncftp netcat openssh openssl patch patchutils perl perl-Error ping psmisc rebase rsync run rxvt sed subversion subversion-perl tar tcltk termcap terminfo terminfo0 texinfo tig time tzcode unison2.27 unison2.31 util-linux vim wget which whois xz zip zlib zlib-devel zlib0 zsync _update-info-dir

[UPDATE:]

while the above command works, there is a better alternative to obtain the list of installed packages – including their version: cygcheck

cygcheck -cd

find changes in config files (debian/ubuntu)

want to know which files in /etc have been changed on your debian-like Linux system?

one part can be done with the package debsums, which compares the md5sums delivered with a debian-package with those of the current files:

$ sudo debsums -a -s
.
.
debsums: checksum mismatch apache2.2-common file /etc/apache2/sites-available/default
debsums: checksum mismatch apache2.2-common file /etc/apache2/ports.conf
.
.

Note 1: this does NOT cover configuration files that are not part of the .deb-package itself, e.g. those manually created by a user AND as well those built by a package’s configuration/post-install scripts. You have been warned!

Note 2: debsums can give hints about a compromised system, but it’s absolutely no guarantee that a non-suspicious output comes from a clean system – if the system’s compromised, an attacker could as well change the md5sums-database of a package (residing in /var/lib/dpkg/info/PKGNAME.md5sums)

batch/cmd programming

Compared to powerful command line interpreters like bash, ksh or similar, Microsoft’s cmd is a real pain. But sometimes you can’t avoid using it, so here’s some help:

Terry Newton’s Batch Guide
An A-Z Index of the Windows XP command line