Pkgsrc Programs
The LiveDVD is built using the nrelease framework. If you plan to making your own "distribution", you must have a complete set of pkgsrc packages on your hard disk. Its easiest if they are built from a single pkgsrc checkout and bulkbuild, since that will reduce the chance of library incompatibilities. This process is covered very well on wiki.dragonflybsd.org/index.cgi/PbulkBuilding. By default the path to your binary packages is set to /usr/release/packages, but you can override it with the variable PKGSRC_PKG_PATH.
As a sidenote, for fluxbox to support the PNG files used on the LiveDVD, add the following to /usr/pkg/etc/mk.conf:
PKG_OPTIONS.fluxbox = imlib2
Pkgsrc Bootstrap Kit
To include the tools used for managing pkgsrc, a bootstrap kit package must also be included. The simplest way to build your own is through a chroot or virtual kernel with a fresh pkgsrc infrastructure. That essentially means that /usr/pkg and /var/db/pkg have been completely wiped. After that, you may build a new one in the following way:
# rm -rf /usr/obj/bootstrap-kit-*
# cd /usr/pkgsrc/bootstrap
# ./bootstrap --workdir /usr/obj/bootstrap-kit-`date "+%Y%m%d"` \
--gzip-binary-kit /usr/pkgsrc/packages/All/bootstrap-kit-`date "+%Y%m%d"`.tgz
# mv /usr/pkgsrc/packages/All/bootstrap-kit-*.tgz /usr/release/packages
Obtaining the source and Building
Once you have your packages and your bootstrap kit, make sure you have at least 3GB of free space under /usr/release, and cdrtools installed. Next, acquire the DragonFly source and familiarize yourself with the make file.
# rsync -avz favorite_mirror::dragonfly-cvs/src /usr/dfcvs
# rsync -avz favorite_mirror::dragonfly-cvs/CVSROOT /usr/dfcvs
# cd /usr
# cvs -d /usr/dfcvs checkout -r HEAD -PAd src
# cd src/nrelease
# vi Makefile
As you can see, the PKGSRC_PACKGAGES variable defines what packages will be included on the LiveDVD, you may include as many packages as you want, and are only limited by free space on the DVD. As of now, you must acquire a custom nrelease directory and overwrite the one in your /usr/src directory. The custom nrelease tarball can be found
here.
If you want to add special configuration files for your program, you may do so by adding them to the ROOTSKELS /usr/src/nrelease/gui. Keep in mind though, that the contents of certain directories are read into MFS so if you want to include many more things in your gui/root directory, you must also increase the size of that mfs partition in gui/etc/fstab. Copying over your private configuration files is as simple as moving them over like this:
# cp ~/.zshrc gui/root
The last step is to actually build the LiveDVD which is done by executing the following command in /usr/src/nrelease:
# make release installer gui
This will result in a brand new /usr/release/dfly-gui.iso being built.