# Tag Archives: bsd

Top-level organizational unit for BSD Unix systems

# itojun passed away

I found out yesterday on IRC that there was a rumour floating around that itojun had passed away. We finally found a Japanese text online by the younger brother (おとうと) stating that he has passed away. Undeadly also has more about it.

I want to use this space to express my wishes of support towards his family that he leaves behind.

# FreeBSD Ports and the X.org reorganization

Seems the FreeBSD Project has thawed the ports collection. For the past two weeks many ports people were working on a large reorganization in order to update the version of X in the ports to 7.2. This also meant that /usr/X11R6 as a path name would be dropped in favour of /usr/local.

In related news Stephen Montgomery-Smith was checking out the slowness of pkg_install and actually found it using a bubble sort which did not perform all that well for the particular case pkg_install is being used for nowadays. As he himself said:

For starters it uses a bubble sort. I can understand why they don’t want to use a quicksort, because they want to check complete integrety of comparison tree (i.e. that there are no internal loops), but I recall seeing an algorithm due perhaps to one of or both of Hopcroft and Tarjan that uses a depth first search, maybe 20 years ago, that should be much faster, and I think I could reproduce it.

# C99 and DragonFly BSD

Gee, that brings back memories.

# screen, 256 colours and termcap mixed with PuTTY and FreeBSD

I have a 256 colour xterm set up on my DragonFly box.

Works perfectly. Especially for vim.

Now, I use FreeBSD 5.x as a gateway box to ssh into and have irssi and likewise programs screened.

Now, I was surprised to learn that I had only 16 colours. Outside of screen I had a full 256 colour palette (make sure to fix your PuTTY configuration by the way), but inside I was stripped of my colour scheme.

So I set off to find what was causing this. Interestingly enough one of the first emails encountered was from Jeremy Chadwick who had the exact same problem.

Turns out that screen needs to be compiled with 256 colour support (a knob should be in your ports Makefile now).

Since FreeBSD’s and DragonFly’s termcap is bereft of any 256 colour definitions for xterm apparently, you need to add the following to $HOME/.screenrc: termcap xterm* 'Co#256:AB=E[48;5;%dm:AF=E[38;5;%dm' terminfo xterm* 'Co#256:AB=E[48;5;%p1%dm:AF=E[38;5;%p1%dm' This overrides your termcap settings with the appropriate definitions. If you now start screen from a shell that has TERM exported as xterm or xterm-color (xterm* wildcard actually) it will fork off to a screen with 256 colour support. You might need this in$HOME/.vimrc:

if &term =~ "xterm" || &term =~ "screen"
set t_Co=256
if has("terminfo")
let &t_Sf=nr2char(27).'[3%p1%dm'
let &t_Sb=nr2char(27).'[4%p1%dm'
else
let &t_Sf=nr2char(27).'[3%dm'
let &t_Sb=nr2char(27).'[4%dm'
endif
endif

# strmode() function declaration buglet fixed

Was converting files to proper ANSI C function declarations and a user tripped over the fact that old 4.4 BSD’s function prototype of strmode() had int as a parameter, whereas it has been mode_t for a long, long time (read 1994 at least).

This broke buildworld of course.

NetBSD is fixed (as was to be expected to be honest).

And OpenBSD made the parameter int everywhere with a XXX comment in the strmode.c file that it should be mode_t actually. Weird.

# True Type fonts, X.org, and MathML

I use MathML. Why? Because it just makes sense for mathematics on the websites.

On my DragonFly I had to do the following:

Installed X.org 6.8.1 or .2. Enable xfs (the X font server) by adding xfs_enable="YES" to rc.conf.

From ports install x11-fonts/ttmkfdir and x11-fonts/urwfonts-ttf.

Extract http://www.mozilla.org/projects/mathml/fonts/bakoma/texcm-ttf.zip to /usr/X11R6/lib/X11/fonts/TTF.

Extract from http://support.wolfram.com/mathematica/systems/windows/general/latestfonts.html the 4.1 TrueType fonts to /usr/X11R6/lib/X11/fonts/TTF.

In /usr/X11R6/lib/X11/fonts/TTF do:

# ttmkfdir > fonts.scale
# mkfontdir

This will update fonts.scale and fonts.dir, check them with cat or more to see if they contain references to the extracted new .ttf files.

Change /usr/X11R6/lib/X11/fs/config to have /usr/X11R6/lib/X11/fonts/urwfonts-ttf added to catalogue.
Also add /usr/X11R6/lib/X11/fonts/urwfonts-ttf as a FontPath to /etc/X11/xorg.conf.

# xset fp+ /usr/X11R6/lib/X11/fonts/urwfonts-ttf
# xset fp rehash

Edited $HOME/.fonts.conf and added: [xml]<?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <match target="pattern"> <test name="family"> <string>symbol</string> </test> <edit name="family" mode="append" binding="strong"> <string>Standard Symbols L</string> </edit> </match> </fontconfig>[/xml] Added user_pref("font.mathfont-family", "Math1, Math2, Math4"); to $HOME/.mozilla/firefox/<profile.default>/user.js.

There seem to be some bugs still, at least in displaying the W3C test suite.

# SATA and RAID

Been looking at 3Ware and Areca SATA RAID controller cards. Looks like very decent stuff and best of all: FreeBSD support.

Combined with a Chenbro chassis makes for a nice RAID system with good cooling. The Chenbro stuff comes with enclosures to put your normal disks in, so no need for ordering expensive ‘specially prepared’ hard disks from \$VENDOR. Just order your regular 200 GB Barracuda SATA disk, put them in the enclosures and place them in the chassis.

# Words of Light

Over the last couple of days I have been busy updating a lot of support within DragonFly, think of firewire support, ATA/SATA, AC’97, bridges, PCI definitions, and so on.
Lovely stuff.

Now if only my AMD Athlon/Asus A7N8X box would boot. Something is wrong with the nexus attachment.

At the moment de-OSSGing my TenDRA sources. If you’re doing whitespace changes run md5 on the resulting object file before and after the changes. They should match.

chak de chak de chak de // Cast it off…
chak de saare gam // cast off every sorrow.
chak de chak de chak de // Cast it off…
tere sang hain hum // I’m by your side!

Chak de, from the Indian movie Hum Tum…

# Gaara – 我愛羅

Of course, some people might recognise the title. Sabaku no Gaara (砂瀑の我愛羅) being a character from the anime series. The name means: Gaara of the Desert. The name Gaara (我愛羅) itself is a combination of: ga-a(i)-ra, meaning: I, love, demon. In general you could read it as: “I love myself, I am a demon.”

The kanji ‘ai':

For some reason I love this Kanji. Consists of 13 strokes.

DragonFly is pushing along nicely, Emiel a.k.a. coolvibe has managed to get into contact with the NVIDIA guys and is now even getting prerelease drivers! Way cool. Thanks to all the people supporting DragonFly in any way, your enthousiasm is what keeps us moving along.

One of my plans for DragonFly’s support is bootable images for ISO 9660 and diskettes which do various reporting on BIOSes and the like. This should provide clues into the wonderful world of whacked implementations.

I also started work on the bdb (BSD-licensed debugger) in order to support my own work as well as DragonFly.