Messylaneous for 2010/03/08

I gots a Summer of Code org application to write up, so you get a linkdump:

An mp3 of “PFSense II, Rocking The Datacenter” at NYCBUG, via Dru Lavigne.  Also, her “BSD for Linux Users” at the SCALE website.

A 5-part series about Scripting Vim, written by a terribly smart guy?  Interesting!  (Yeah, I did link to a part of it before…)

Have you ever wondered if building more than one pkgsrc package at a time can be a problem?  Others have too, and apparently there’s a fix.   If you don’t want to have to get to a command line to find the answer, it’s:

PKGSRC_LOCKTYPE?= none
The type of locking that will be done if competing processes
attempt to do work on one package directory simultaneously.

Possible values:
* none: No locking takes place at all.
* once: When the lock has already been aquired by another
process, the current process is terminated.
* sleep: When the lock has already been acquired by another
process, the current process will sleep for PKGSRC_SLEEPSECS
seconds and then try again.

You should also set OBJHOSTNAME when you are using the same
copy of pkgsrc on different hosts, maybe via NFS. This is because the locking process writes its process ID into the lockfile, and process IDs on different hosts are unrelated.

See also: LOCALBASE_LOCKTYPE, WRKDIR_LOCKTYPE.

Self-hosting clang; building DragonFly with it too

clang, which many people look to as a gcc replacement, is now able to build itself.  (Thanks John Marino for the heads-up, some time ago)  It can also build world and kernel on DragonFly, going on the work of Sascha Wildner!

Using the pkgsrc package,  put

clang_CC=/usr/pkg/bin/clang

in /etc/compilers.conf and then set $CCVER to “clang” when building:

env WORLD_CCVER=clang make -DNO_GCC44 buildworld

I haven’t tried this, so any errors in description are mine, not Sascha’s – can someone verify? I don’t have a test system to run it on right now.

Edit: see Sascha’s comment for the definitive method.

Obligatory iPad mention

The iPad is BSD-based, which is neat.  I like the notion of covering more BSD devices and products here on the Digest.

But: do you like even the vague concept of open source?  The iPad is expressly designed to limit your choices, especially with media consumption and the programs you run.  It’s sort of like owning a TV circa 1975 – you get what large media groups and the network (Apple) want you to see. I don’t want to come across as someone who’s complaining because it’s different – I’m complaining because it’s not different.

There’s other people arguing the same idea, with even more reasonsThis is one of the most specific.  Plus, there’s the natural progression

(b)make install change in pkgsrc

Joerg Sonnenberger announced new behavior in pkgsrc: Performing “bmake install” in pkgsrc with a package that supports DESTDIR will build a binary package and then install from that package.  This means a package will be successfully build before the installation process is started, and I assume is to assist further work down the road.

Details: The old behavior was to build and install directly, which “bmake stage-install” can reproduce.  DESTDIR support means that the software can be installed as non-root.