Making your own FreeBSD Subversion repository mirror

Not long ago it was announced that the FreeBSD ports tree will cease exporting its Subversion repository to CVS, and subsequently any use of CVSup for updating the ports tree will be discontinued by February 28th 2013.

FreeBSD’s main source tree repository has been served by Subversion since late May 2008 with every commit done in the Subversion repository being exported to the old CVS repository, but no date has been announced when that Subversion to CVS transfer will be shut down. Stay tuned for more information.

Nonetheless, this is a Good Time™ to begin the transition from CVSup to Subversion once and for all. And why not set up your own FreeBSD Subversion repository mirror for both the main source tree and the ports tree well ahead of the transition? Continue reading Making your own FreeBSD Subversion repository mirror

How many IPv4 addresses are there?

An acquaintant posted the following question on an IRC channel earlier today:

How many IPv4 addresses are there?

The quick and simple answer is 232 = 4,294,967,296 addresses.

Is this an accurate answer? Yes, in a strict interpretation of the original question.

A far more interesting puzzle is if you want to account for all the IPv4 addresses usable on the public internet. Continue reading How many IPv4 addresses are there?

When to create a ZFS filesystem?

Someone named “Edward M” posted on the freebsd-questions mailing list a question of when should we create a ZFS filesystem. I didn’t reply to any of the messages, but I decided to write this post expressing my view.

In short, whenever a part of the filesystem hierarchy exhibits different characteristics, create one or more ZFS filesystems for that particular subtree. Continue reading When to create a ZFS filesystem?

Secret splitting

A few days ago I resurrected all my files from a desktop system I haven’t used for almost six years. Below is my implementation of secret splitting as described in Bruce Schneier’s book “Applied Cryptography, 2nd edition”.

The idea is basically: generate a random keystream, xor the plaintext with the random keystream, use separate couriers and send the random keystream and the ciphertext to the final destination using separate routes, and finally combine the random keystream with the ciphertext to recreate the plaintext. None of the couriers know which piece they are carrying.

To improve this idea would be to generate more than one random keystream, xor the keystreams and the plaintext, thus requiring more couriers and different routes for each datastream.

And, by the way, xor crypto isn’t really that strong. Continue reading Secret splitting

endofepoch.c

Jeg børstet støvet av noen tilårskomne filer forleden dag. Jeg fant et lite program som jeg skrev en gang i 2000. Programmet teller ned til slutten av Unix-epoken.

Den opprinnelige definisjonen av datatypen time_t, 32-bit heltall med fortegn, vil få overflyt i midten av januar 2038. Moderne 64-bit OS som FreeBSD/amd64 9.0 har for lengst gått over til 64-bit time_t. Bare ta en titt i fila /usr/src/sys/amd64/include/_types.h, omtrent ved linje 83. Problemet med overflyten i år 2038 vil fortsatt gjelde alt utstyr og (binære) filformater som bruker den gamle definisjonen, slik som FreeBSD/i386 9.0. Ta en titt i fila /usr/src/sys/i386/include/_types.h, omtrent ved linje 91. Den engelske utgaven av Wikipedia har en utfyllende artikkel om problemet.

Kildekoden for det søte, lille programmet mitt, er gjengitt under. Continue reading endofepoch.c

Yet another technical oriented blog, more or less