Typical FreeBSD development workflow?

Hey!

I'm wondering what the typical workflow of FreeBSD developers is. Do you usually make changes directly in the source tree and then run make buildworld && make installworld on top of a working system? Or do you use jails or VMs?

I checked the FreeBSD Developers' Handbook, but I couldn’t find anything describing the day-to-day development workflow.

Thanks you!
 
I'm not a FreeBSD developer (committer), but I frequently send patches to the source tree (mostly man pages). I have source tree for my machine (-STABLE) under /usr/src, and I have a separate tree for the latest source tree (-CURRENT) under /usr/src-current. I make changes for patches in the /usr/src-current (before making changes I fetch the latest sources via git pull). Both /usr/src and /usr/src-current are owned by me (my regular user), so that I can easily edit and compile the files without permission issues. This way I also can use git without going to root.

Do you usually make changes directly in the source tree and then run make buildworld && make installworld on top of a working system?
As I said, I usually fiddle with manual pages, which does not require building the world. So, I make a change to the man page and then examine it right in place (say, we have a change to sh(1) manual page): man ./bin/sh/sh.1. Sometimes I also change the source code for some programs (just for myself), and in that case it's again not necessary to install the whole world - you can go into the program's directory, compile it, and then use the resulting binary executable from the /usr/obj to test it. Like this:
Code:
# cd bin/ls
# make
# /usr/obj/usr/src/amd64.amd64/bin/ls/ls

But of course, for large kernel or program changes, you would probably need to roll out a VM.
 
Do you usually make changes directly in the source tree and then run make buildworld && make installworld on top of a working system?
As you might imagine, this is not a good way. If you break something (which you will inevitably do) you might end up with a broken system.

Or do you use jails or VMs?
Depends, for userland changes a jail might suffice.
 
Back
Top