MavEtJu's Distorted View of the World

Recent entries:

Tags:

Archives:

Syndicate:
RDF RSS

Migrating from i386 to amd64 - ldd(1) on 32 bit objects

Posted on 2008-07-04 09:00:00
Tags: FreeBSD

In the last couple of months I have migrated left-over applications on old i386 servers running FreeBSD 4.something to jails on amd64 servers running FreeBSD 6.3. It works fine, it works like a charm, thanks to the 32 bit compatibility and the misc/compat4x port. I could just copy everything in /usr/local/ to the new jail, run ldconfig -32 /usr/local/lib and everything started without problems.

There was only an issue with the ldd(1) command in the base-system:

[/] root@ed-exigent>ldd `which httpd`
ldd: /usr/local/sbin/httpd: can't read program header
ldd: /usr/local/sbin/httpd: not a dynamic executable
The man-page of rtld(1) revealed that it could work:
[/] root@ed-exigent>LD_32_TRACE_LOADED_OBJECTS=1 `which httpd`
libm.so.4 => /lib32//libm.so.4 (0x280c8000)
libaprutil-1.so.2 => /usr/local/lib/libaprutil-1.so.2 (0x280de000)
libexpat.so.6 => /usr/local/lib/libexpat.so.6 (0x280f2000)
libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x28110000)
libapr-1.so.2 => /usr/local/lib/libapr-1.so.2 (0x281fd000)
libcrypt.so.3 => /lib32//libcrypt.so.3 (0x2821d000)
libpthread.so.2 => not found (0x0)
libc.so.6 => /lib32//libc.so.6 (0x28235000)
libpthread.so.2 => /usr/lib32/libpthread.so.2 (0x2830d000)
So ldd(1) had to be educated about the differences in the ELF header for 32 bit and 64 bit ELF objects. Once that was done, no problem at all anymore!

Patches are available at bin/124906, have been commited to HEAD and will be MFCed in a week.


No comments

CVSROOT-ports/modules re-animated

Posted on 2008-07-03 10:40:00
Tags: FreeBSD, FreeBSD ports

When it comes to the FreeBSD Ports collection, the CVS repository and the GNATS bug tracking system, people not always understand how its can be made easier.

For example: Did you know that the URL http://bugs.freebsd.org/12345 would bring you automatically to the PR with number 12345? And did you know that if you want to checkout the directory /ports/x11-wm/fvwm95, all you have to do it cvs co fvwm95 (For an easy Mozilla Firefox and Seamonkey (and probably other browsers) sidebar, visit this page)

So, what is the story about that cvs co fvwm95. The magic for that is stored in the file CVSROOT-ports/modules, it contains a list of all ports and their directories. The file is updated every time a port gets commited, removed or changed from location. At least that is the theory. Adding is done manually via the addport script, but removing and changing locations has been always a manual task.

Recently the caretaker of this file had enough of people whinching when he said they needed to update that file when it changed. So he said that support for it would cease. But but but... That would break at least one of my ways to do things easy!

I can do only one thing now, take control over it myself! So I proposed it to portmgr@, who approved it. The second thing to make is a script which mangles /usr/ports/INDEX to generate a modules file (in the shape I like it).

All that is done now, and the CVSROOT-ports/modules file is now updated once per day. See the CVS webinterface for the last update!


No comments

DHCPDUMP 1.8 released

Posted on 2008-06-24 13:00:00
Tags: DHCP, DHCPDUMP

When I wrote DHCPDUMP first, I was lucky because the output of tcpdump, which is used an input for DHCPDUMP, was very consistent. Over the years this has changes a little bit. A lot little bits.

Therefor I present to you: DHCPDUMP version 1.8, now using libpcap as input instead of the output of tcpdump.

You can find it at http://www.mavetju.org/download/dhcpdump-1.8.tar.gz.


No comments

Australian driver license

Posted on 2008-06-04 21:00:00
Tags: Traffic, Australia

Everybody who knows me that I'm crazy with cars. At cars. "Mad at cars" is the more the right line: I have a love / hate relationship with them. I know that todays society can't exist without them, but also that they are the biggest curse in todays society. Anyway, that's not the story here.

The story is about the availability of driver licenses in Australia: The joke goes that you get them with a box of Weetbix. And todays experience only shows that it is true. And why I feel so scared when I'm on the road.

So I got my dutch driver license in 1996, when I was 25. Wait, that was seven years after I was able to get it. I know. I told you I didn't like cars. I got my first car in 2000, five years after I got my driver license. I told you I didn't like cars. I moved to Australia in 2001, so I got rid of my car after six months.

In Australia you need an international driver license which is valid for six months or get an Australian driver license. So after six months I wasn't allowed to drive a car anymore. In 2006 my dutch driver license expired.

So, where does this story go to? Today, in 2008, seven years after I last driven a car, two years after my driver license expired, I got my Australian driver license. How? Just go to the RTA, show your dutch license, show some ID and fill in a form. Expired license? Not a problem. Not haven driven a car in seven years? Not a problem.

And you wonder why I am so scared on the roads here...


No comments