Subversion hosting, CVS hosting, Trac hosting, Bugzilla hosting and software collaboration Providing hosted Subversion, CVS, Trac and Bugzilla repositories

July 18, 2008

Committer Jitters Aren’t Too Bad!

Filed under: Operating Systems — Tags: , — Greg Larkin @ 5:09 pm

I just committed my first big changes to the FreeBSD ports tree. The
Earth still seems to be rotating, so that’s encouraging!


-------- Original Message --------
Subject: cvs commit: ports/devel/cvs-syncmail Makefile
ports/devel/cvsbook         Makefile ports/devel/cvschangelogbuilder
Makefile         ports/devel/cvsstat Makefile ports/devel/cvstrac
Makefile         ports/devel/eventxx Makefile ports/devel/gittrac
Makefile ...
Date: Fri, 18 Jul 2008 21:05:20 +0000 (UTC)
From: Greg Larkin

glarkin     2008-07-18 21:05:20 UTC

FreeBSD ports repository

Modified files:
devel/cvs-syncmail   Makefile
devel/cvsbook        Makefile
devel/cvschangelogbuilder Makefile
devel/cvsstat        Makefile
devel/cvstrac        Makefile
devel/eventxx        Makefile
devel/gittrac        Makefile
devel/p5-SVN-Access  Makefile
devel/p5-SVN-Hook    Makefile
devel/p5-SVN-Notify-Config Makefile
devel/p5-SVN-Notify-Filter-Markdown Makefile
devel/p5-SVN-Notify-Filter-Watchers Makefile
devel/p5-SVN-Notify-Mirror Makefile
devel/p5-SVN-Notify-Snapshot Makefile
devel/patch          Makefile
devel/pear-VersionControl_SVN Makefile
devel/ruby-cvs       Makefile
devel/svntrac        Makefile
graphics/GraphicsMagick Makefile
mail/smtptrapd       Makefile
math/pecl-bitset     Makefile
net/p5-Amazon-SQS-Simple Makefile
net/p5-Net-Amazon-EC2 Makefile
net/p5-Net-Amazon-MechanicalTurk Makefile
net/p5-Net-Amazon-Signature Makefile
net/p5-Net-Amazon-Thumbnail Makefile
net/rubygem-rightaws Makefile
net/rubygem-righthttpconnection Makefile
print/pdftk          Makefile
security/phpdeadlock Makefile
textproc/fileshuffle Makefile
www/cakephp          Makefile pkg-descr
www/cakephp-devel    Makefile pkg-descr
www/codeigniter      Makefile pkg-descr
www/dojo             Makefile
www/dojo-shrinksafe  Makefile
www/p5-Template-GD   Makefile
www/prado            Makefile pkg-descr
www/trac-customfieldadmin Makefile
www/trac-wysiwyg     Makefile
www/webcalendar      Makefile pkg-descr
www/webcalendar-devel Makefile
www/yahoo-ui         Makefile
www/zend-framework   Makefile pkg-descr
Changed my MAINTAINER address to

Approved by:    beech (mentor)

Revision  Changes    Path
1.2       +2 -2      ports/devel/cvs-syncmail/Makefile
1.14      +1 -1      ports/devel/cvsbook/Makefile
1.8       +1 -1      ports/devel/cvschangelogbuilder/Makefile
1.11      +1 -1      ports/devel/cvsstat/Makefile
1.13      +1 -1      ports/devel/cvstrac/Makefile
1.12      +1 -1      ports/devel/eventxx/Makefile
1.2       +1 -1      ports/devel/gittrac/Makefile
1.6       +2 -2      ports/devel/p5-SVN-Access/Makefile
1.2       +2 -2      ports/devel/p5-SVN-Hook/Makefile
1.6       +2 -2      ports/devel/p5-SVN-Notify-Config/Makefile
1.3       +2 -2      ports/devel/p5-SVN-Notify-Filter-Markdown/Makefile
1.6       +2 -2      ports/devel/p5-SVN-Notify-Filter-Watchers/Makefile
1.4       +2 -2      ports/devel/p5-SVN-Notify-Mirror/Makefile
1.2       +2 -2      ports/devel/p5-SVN-Notify-Snapshot/Makefile
1.16      +1 -1      ports/devel/patch/Makefile
1.2       +2 -2      ports/devel/pear-VersionControl_SVN/Makefile
1.13      +1 -1      ports/devel/ruby-cvs/Makefile
1.4       +1 -1      ports/devel/svntrac/Makefile
1.22      +1 -1      ports/graphics/GraphicsMagick/Makefile
1.10      +1 -1      ports/mail/smtptrapd/Makefile
1.2       +2 -2      ports/math/pecl-bitset/Makefile
1.3       +2 -2      ports/net/p5-Amazon-SQS-Simple/Makefile
1.5       +2 -2      ports/net/p5-Net-Amazon-EC2/Makefile
1.2       +2 -2      ports/net/p5-Net-Amazon-MechanicalTurk/Makefile
1.2       +2 -2      ports/net/p5-Net-Amazon-Signature/Makefile
1.2       +2 -2      ports/net/p5-Net-Amazon-Thumbnail/Makefile
1.2       +2 -2      ports/net/rubygem-rightaws/Makefile
1.2       +2 -2      ports/net/rubygem-righthttpconnection/Makefile
1.23      +1 -1      ports/print/pdftk/Makefile
1.2       +2 -2      ports/security/phpdeadlock/Makefile
1.2       +2 -2      ports/textproc/fileshuffle/Makefile
1.12      +2 -2      ports/www/cakephp-devel/Makefile
1.3       +0 -2      ports/www/cakephp-devel/pkg-descr
1.11      +2 -2      ports/www/cakephp/Makefile
1.2       +0 -2      ports/www/cakephp/pkg-descr
1.8       +2 -2      ports/www/codeigniter/Makefile
1.3       +0 -2      ports/www/codeigniter/pkg-descr
1.4       +2 -2      ports/www/dojo-shrinksafe/Makefile
1.4       +2 -2      ports/www/dojo/Makefile
1.4       +2 -2      ports/www/p5-Template-GD/Makefile
1.3       +2 -2      ports/www/prado/Makefile
1.2       +0 -2      ports/www/prado/pkg-descr
1.5       +2 -2      ports/www/trac-customfieldadmin/Makefile
1.7       +2 -2      ports/www/trac-wysiwyg/Makefile
1.3       +1 -1      ports/www/webcalendar-devel/Makefile
1.13      +1 -1      ports/www/webcalendar/Makefile
1.3       +0 -2      ports/www/webcalendar/pkg-descr
1.6       +2 -2      ports/www/yahoo-ui/Makefile
1.17      +2 -2      ports/www/zend-framework/Makefile
1.2       +0 -2      ports/www/zend-framework/pkg-descr

Greg Larkin – The Power To Serve

Call me - Greg Larkin: error

July 17, 2008

FreeBSD, The Power To Serve And The Privilege To Commit

Filed under: Operating Systems — Tags: — Greg Larkin @ 5:43 pm

Hi readers,

I was recently received an invitation to become a FreeBSD committer in
the ports tree. Over the years, FreeBSD has become an integral part of
the infrastructure, and I have been gradually gaining
experience, adopting ports and submitting problem reports.

I plan to continue working on and expanding my knowledge of this great
operating system
, and if you haven’t given it a try yet or created your
first port, feel free to contact me!

The attached message is my introduction to the other developers. In the
next day or so, I will likely commit my first changes (subject to
approval, natch) to the ports repository, and with any luck the
Intertubes will continue to function correctly!


——– Original Message ——–
Subject: Introduction: Greg Larkin
Date: Thu, 17 Jul 2008 16:42:57 -0400
From: Greg Larkin
Organization: The FreeBSD Project

Greetings all,

I want to introduce myself as a new ports committer with xxxxx@ as my
mentor and yyyyy@ as co-mentor. I have been self-employed since 1996
and founded my current company,, LLC, in 2000. After
splitting my time between that company and freelance software
development work for a few years, I finally went full-time with the new
company in 2005.

I learned about FreeBSD from the folks at my former datacenter and liked
its simplicity and consistency after working with numerous Linux
distros. I created my first port (www/webcalendar – 3 years ago now!)
because I wanted to install the software and easily upgrade it with
future versions. Since then, I have created additional ports for
various PHP frameworks, CVS & SVN-related tools and Amazon AWS-related
modules. I’m very interested in the CVS->SVN transition for pcvs, and I
hope to assist in that effort.

I’m privileged to become a committer, and thanks very much to xxxxx,
yyyyy, zzzzz and everyone else for all of the advice and
support that brought me here!

Best regards,

Greg Larkin – The Power To Serve

Call me - Greg Larkin: error

June 23, 2008

For Your Convenience – Pre-Formatted Virtual Disk Drives

Filed under: Operating Systems — Tags: , , , — Greg Larkin @ 4:01 pm

Hi everyone,

A while back, I made some blank VMware VMDK images available in various sizes. I am now making some pre-formatted VMDK images available that are even easier to use. Of course, these images are specific to the operating system you’re using, and as long as that’s FreeBSD, you’ll be fine. :)

I can make pretty much any size or operating-system-specific filesystem type, so what else would you like to see?

Call me - Greg Larkin: error

June 19, 2008

FreeBSD 7.0 + SCHED_ULE Virtual Machine Available

Filed under: Operating Systems — Tags: , — Greg Larkin @ 2:40 pm

Hi everyone,

I’m diving into some new work with virtual appliances, so I thought I would make a clean FreeBSD 7.0 VM available to you. This one has the following configuration:

  • SCHED_ULE scheduler has been selected instead of SCHED_4BSD
  • Other minor option tweaks in the new kernel config file vs. the GENERIC kernel config. The updated kernel config can be found here
  • Root password is “password”
  • LSI Logic SCSI virtual disks are used instead of IDE so the VM can be deployed to VMware ESX Server
  • /usr/src and /usr/ports filesystems are packaged as separate downloads
  • Two separate base systems are available – one for VMware Server 1.0 and one for VMware Player 1.0. Why these products use a slightly different VMX file format is beyond me!

I plan to use this vanilla VM as the base for future VM downloads, and by breaking /usr/src and /usr/ports into separate downloads, that will keep the overall size down.

All downloads are available from BitTorrent, and please consider seeding the files if you find them useful!

Call me - Greg Larkin: error

May 8, 2008

Getting ElasticDrive to Work Under FreeBSD

Filed under: Operating Systems — Tags: , , — Greg Larkin @ 2:38 pm

Hi everyone,

I recently learned of the ElasticDrive application that implements a disk device backed by Amazon S3 and other kinds of storage services. To determine whether I could easily deploy an infinitely-scalable disk device on my FreeBSD servers, I downloaded ElasticDrive and proceeded to install it on a FreeBSD 7.0 virtual machine.

There are a few prerequisites, such as FUSE and Python setuptools, but those are easily installed with the FreeBSD ports system. If I can get ElasticDrive to work, it will be handy to package it as a port for one-command installation.
In the mean time, I installed it manually and edited the /etc/elasticdrive.cfg to point to my Amazon S3 account. I reduced the size of the S3 backing store to a 100Mb disk:

#Path to fuse is the path to the device mount folder. NOT your fuse libraries

After I fired up the tool, I saw my ElasticDrive file:
fbsd70# ls -al /mnt/elasticdrive
total 102403
drwxr-xr-x  2 root  wheel          0 Dec 31  1969 .
drwxr-xr-x  4 root  wheel        512 May  7 13:36 ..
-rw-r--r--  1 root  wheel  104857600 Dec 31  1969 ed0
-r--r--r--  1 root  wheel        391 Dec 31  1969 stats
fbsd70# du -sh /mnt/elasticdrive
100M    /mnt/elasticdrive

Cool – this looks promising!

FreeBSD uses the mdconfig command to create a file-backed loop device, similar to the Linux losetup command. This is too easy:

fbsd70# mdconfig -a -t vnode -f /mnt/elasticdrive/ed0 -u 0
fbsd70# ls -al /dev/md0*
crw-r-----  1 root  operator    0, 101 May  8 12:32 /dev/md0
crw-r-----  1 root  operator    0, 106 May  8 12:32 /dev/md0a
crw-r-----  1 root  operator    0, 107 May  8 12:32 /dev/md0c
fbsd70# fdisk /dev/md0
******* Working on device /dev/md0 *******
parameters extracted from in-core disklabel are:
cylinders=12 heads=255 sectors/track=63 (16065 blks/cyl)

parameters to be used for BIOS calculations are:
cylinders=12 heads=255 sectors/track=63 (16065 blks/cyl)

fdisk: invalid fdisk partition table found
Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 63, size 192717 (94 Meg), flag 80 (active)
beg: cyl 0/ head 1/ sector 1;
end: cyl 11/ head 254/ sector 63
The data for partition 2 is:
The data for partition 3 is:
The data for partition 4 is:

Ok, let’s create a filesystem and test it out:
fbsd70# newfs /dev/md0a
/dev/md0a: 100.0MB (204784 sectors) block size 16384, fragment size 2048
using 4 cylinder groups of 25.00MB, 1600 blks, 3200 inodes.
super-block backups (for fsck -b #) at:
160, 51360, 102560, 153760
cg 0: bad magic number

Woops – what’s this now?! Looking at the newfs source code, this error is generated when data read back from the disk doesn’t match data written to the disk.

I’ve tried to figure out what the problem is using truss and other techniques, and I’ve contacted ElasticDrive to see if they have any ideas. So far, nothing has worked.

If anyone else has an idea how to troubleshoot this, let me know.

Call me - Greg Larkin: error

April 26, 2008

Who’s Going To BSDCan 2008?

Filed under: Operating Systems — Tags: , , — Greg Larkin @ 4:15 pm

Hi everyone,

I just registered for the BSDCan 2008 conference in Ottawa, ON, Canada on 5/16 and 5/17. I’m really looking forward to meeting some of the folks that I’ve exchanged emails with over the past couple of years while learning and using FreeBSD and maintaining some ports.

Is anyone reading this post going to be at the conference, too? If you want to meet up, drop me a line and let me know. I hope to leave the conference with a lot of new FreeBSD knowledge and hear about how others use it and what to expect in future versions.

I’m also just looking forward to getting back to Ottawa. We’ve mostly visited there in the winter for the Winterlude and cross-country skiing at Parc Gatineau. If you enjoy freezing your tail off in mid-February (-30F at night not unheard of!) and skating on the Rideau Canal with 50,000 other fun-loving souls, you’ve got to visit!

I imagine that the warmer months will be very nice as well, and I do hope to see some of the Tulip Festival while I’m there.

Call me - Greg Larkin: error

April 20, 2008

Updated FreeBSD 7.0 VMware Image Now Available

Filed under: Operating Systems — Tags: , , — Greg Larkin @ 4:22 pm

Hi everyone,

I updated the ports tree and repackaged the FreeBSD 7.0 VMware virtual machine that turned out to be corrupted in my earlier release. I apologize for anyone who was inconvenienced, and I still don’t know how part of one of the disks was corrupted, since the source image was fine.

Anyway, you can find the new download here: VMware 7.0 virtual machine with ZFS enabled

If you run into any problems, please contact me.

Call me - Greg Larkin: error

April 18, 2008

Update: Need Help with VMware Workstation Running on Microsoft Vista

Filed under: Operating Systems — Tags: , — Greg Larkin @ 5:36 pm

Hi everyone,

In a previous post, I asked for assistance about getting a FreeBSD 7.0 virtual machine running on VMware Workstation on MS Windows Vista. Well, it turns out I didn’t need any help after all – the torrent file was corrupted!

Somehow, one of the 2Gb slices of the VM’s boot disk was truncated to ~1.4Gb. I don’t know how it happened – perhaps during the ZIP compression. It’s very odd, because the rest of the slices were fine.

Anyway, I’m preparing a new torrent, and I’ll post the link when it’s ready.

Call me - Greg Larkin: error

Routing Between Virtual Machines on Separate Physical Servers

Filed under: Operating Systems — Tags: , — Greg Larkin @ 5:30 pm

Hi everyone,

A while back, I was setting up some virtual machines, each with a public and host-only network interface. I like using the host-only interface for high-performance VM-to-VM communications and then to expose the WAN IP to the Internet for public access.

I soon ran into a problem, though. What happens if a VM on one physical server needs to make an internal connection to one on another physical server? The first VM has to use the public IP address of the second VM, but I still want the connection to be essentially private and not route the packets outside of the firewall-protected LAN.

Here’s a diagram showing the VMware Server configuration with virtual machines and host-only networks (click to enlarge):

Network Diagram in VMware Server Environment

For the following examples, let’s use these IP addresses for the physical servers and virtual machines:

Hostname WAN IP LAN IP Gateway IP

Notice that the LAN IPs are repeated for VMs on different physical hosts. That’s because the VMs are connecting to a host-only network on each physical machine and are independent of each other. Therefore, they can use the same IP numbers without conflicting.

Ok, so assume VM1 is a public-facing web server, and VM4 is a database server with no external services exposed except for ssh. Since there’s no way for VM1 to use VM4′s LAN IP address to connect to the database – the IPs are the same – VM1 has to use VM4′s WAN IP.

Let’s now trace where a packet as it originates from VM1 bound for VM4. This table shows the path that the packet takes, along with the source address as it passes through each hop.

Hop # Hostname Source Addr Dest Addr
1 VM1
2 PH1
3 GW1

Woops – the packet has made it out to the gateway router (GW1)! That’s not what we want, because the packets exchanged between any VM should stay on the inside of the firewall. The same problem occurs if any VM on one physical machine connects to a VM on the other physical machine.

Luckily, this easily fixed by adding some static routes to each physical machine to help guide the packets where they need to go. Instead of allowing packets bound for a VM to use the default route and get sent to the gateway router, a static route redirects them to the next hop that we specify.

On RHEL4, the /etc/sysconfig/static-routes file controls any required extra routes. On PH1, the file will look like:

any host gw
any host gw
any host gw

The file on PH2 looks like:
any host gw
any host gw
any host gw

This simply means “when sending a packet to host X (e.g., first send it to host Y (e.g., because it has the information about how to get there”.

Once the static routes are installed, the packet trace now looks like:

Hop # Hostname Source Addr Dest Addr
1 VM1
2 PH1
3 PH2
4 VM4

Of course, this can be extended across many virtual machines and physical machines, and it always helps to trace the packet and the network routes at each hop to determine where it’s going next. The traceroute command is your friend!

Call me - Greg Larkin: error

April 15, 2008

Keeping VMware Management Log Files Under Control – Take 2

Filed under: Operating Systems — Tags: , , — Greg Larkin @ 7:12 am

Hi everyone,

In a previous post, I postulated a solution for rotating the Apache log files produced by the VMware MUI application. Unfortunately, the MUI version of Apache doesn’t work well with logrotate, as I discovered over the weekend.

After receiving an alert on the cell phone in the middle of the night that the MUI was down, I discovered this in the /var/log/vmware-mui/error_log file:

[Sun Apr 13 04:02:03 2008] [error] Could not destroy the stale named pipe directory: /var/run/vmware//httpd/21157\n
[Sun Apr 13 04:02:03 2008] [error] VMWARE PANIC: \nNOT_IMPLEMENTED F(4023):707\n
[Sun Apr 13 04:02:03 2008] [error] Panic: Could not allocate temporary context.\n

Ok, perhaps there’s a better solution than logrotate and one that I’m already using with Apache in all of the virtual machines. A while back, I discovered the httplog tool, which builds on the premise of the standard rotatelogs tool that’s part of the Apache distribution. Since it doesn’t restart Apache when it rotates its log files, I suspected it might work well with the MUI.

Since the MUI is running on a RHEL4 system, I created an RPM of httplog instead of installing directly from the source distro. After many years working with Linux and FreeBSD, I much prefer everything to be installed from an RPM or a port, just for sanity’s sake and managing future upgrades.

The next step is to integrate the httplog command into the MUI’s httpd.conf file, found in /usr/lib/vmware-mui/apache/conf. If you’d like to update your file, download this patch file, and run the following commands (after installing httplog):

rm -f /etc/logrotate.d/httpd.vmware
/etc/rc.d/init.d/httpd.vmware stop
patch -b --verbose  /usr/lib/vmware-mui/apache/conf/httpd.conf < httpd.conf.httplog-patch
/etc/rc.d/init.d/httpd.vmware start

After starting up httpd.vmware, your /var/log/vmware-mui directory should look something like this:
total 16
lrwxrwxrwx  1 root root   36 Apr 14 17:12 error_log -> /var/log/vmware-mui/200815-error_log
-rw-r--r--  1 root root  186 Apr 14 17:12 200815-error_log
lrwxrwxrwx  1 root root   41 Apr 14 17:12 ssl_engine_log -> /var/log/vmware-mui/200815-ssl_engine_log
lrwxrwxrwx  1 root root   42 Apr 14 17:16 ssl_request_log -> /var/log/vmware-mui/200815-ssl_request_log
lrwxrwxrwx  1 root root   37 Apr 14 17:16 access_log -> /var/log/vmware-mui/200815-access_log
-rw-r--r--  1 root root  396 Apr 14 17:31 200815-ssl_request_log
-rw-r--r--  1 root root 3820 Apr 14 17:31 200815-ssl_engine_log
-rw-r--r--  1 root root  328 Apr 14 17:31 200815-access_log

I’ve got my httplog process configured to encode the week number into the Apache log filenames, rotate them each week and compress the rotated logs. If you want to automatically remove compressed logs after a certain number of weeks, a simple cron job accomplishes that.

httplog accepts many different filename configurations, so man httplog for more information or post questions here.

Call me - Greg Larkin: error
Pages: Prev 1 2 3 4 Next

Powered by WordPress