About

FreshBSD is a source code commit log search engine targeting users of BSD-licensed operating systems such as FreeBSD, OpenBSD, and NetBSD.

It aims to make it easy to search through their development history, and keep track of new developments with an easy-to-use, fast, and accessible interface.

Software

FreshBSD launched in March 2006 as a Ruby on Rails site driven purely by MySQL, reusing the search query handling code I originally wrote for Newzbin. It worked by parsing commit messages from mailing lists.

The site was relaunched as v2 using Ramaze and Solr, which greatly improved search performance and simplified the web stack.

v3 was released some time later, moving away from email parsing and instead retrieving data directly from SVN and git. It also saw the switch to ElasticSearch, and a migration to Padrino, because what’s the point in having all these web frameworks if you don’t use all of them.

In 2016 v4 of the site was launched, this time based on Roda, using PostgreSQL as the backing database via Sequel, with Redis as a caching server and ElasticSearch continuing to drive search.

It was also migrated to JRuby to enable the heavy use of Concurrent Ruby, which greatly speeds up both indexing and page generation.

Hardware

FreshBSD lives on a server called Voi, named after a minor character in Peter F Hamilton’s Night’s Dawn Trilogy. It lives in my attic, and runs FreeBSD.

It’s an old Westmere-architecture dual hex-core Intel machine, with a pair of 2.1GHz L5639’s and 192 GiB of memory. It has ZFS-mirrored 1 TB SanDisk Extreme Pro SSDs as primary storage.

It’s getting a bit long in the tooth, occasionally some of the memory goes missing after a reboot, and the SSDs like to throw IO errors during ZFS scrubs.

If you’re in a position to donate something newer, that would be awesome.

The front-end of the site is a Portfast VPS named Ita (after a group in Neal Stephenson’s novel Anathem), which uses Varnish to cache content so you’re not always at the mercy of my cable modem. If you’re after a reliable VPS host or domain registrar in the UK, they are easy to recommend.

Wetware

The site is developed, maintained, and hosted by Thomas Hurst, an under-achieving weirdo from the North-East of England.

If you feel anything here is missing, or wrong, you should bug him about it, because it’s his fault. It’s all his fault.

Known Issues

Git

Git doesn’t maintain metadata about what branch a commit was made on. FreshBSD currently uses git name-rev which isn’t really made to determine this, but it’s fast and better than nothing.

Improving this is on the todo, though it’s likely it’ll never be perfect. Ideas and code are welcome.

CVS

CVS support uses a modified version of rcshist – mainly to make its output more machine-readable.

The main deficiency people keep noticing is the lack of proper $Keyword$ expansion in diffs – they’re always one revision behind. This is an artifact of how the deltas are stored in RCS.

See Also

FreshPorts is focused entirely on FreeBSD ports and offers a wide array of features specific to that which FreshBSD is unlikely to ever try to replicate. They also have a FreshSource project which intends to be more general.

The FreeBSD and Linux Kernel Cross-Reference offers a powerful way to explore and search kernel source code from various projects.