# Handy hints for DragonFly developers The following is a "cookbook", of sorts; a listing of common forms of commands for working with a DragonFly system, with brief descriptions of what they each do. They might prove useful to anyone who learns easily from examples. `Note`: These items are ported from the bsdinstaller wiki and are basically "a cheat sheet" for common commands. Feel free to add to this list. `Note`: A backslash at the end of a line indicates a wrapped line; there is no need to actually type it. `Note`: You can type your username instead of `whoami` where it appears in the following example (since your username is what `whoami` generates anyway.) Table of contents [[!toc levels=3]] # CVS See also: [[CVS]] To check out a copy of the DragonFly sources from your local CVS repository in /home/dcvs: cvs -d /home/dcvs update -Pd src or even better, create a ~/.cvsrc file with: cvs -q diff -u update -Pd checkout -P rtag -a To add a bunch of files to CVS at once: find . \! -path '*/CVS*' | xargs cvs add To add a (simple, non-branch) tag to an entire module: cvs rtag THE_TAG_NAME the_module To slip an existing tag to the HEAD revision of a specific file (be careful!): cvs tag -F THE_TAG_NAME the_file To completely remove a tag from a file (again, be careful!): cvs tag -d THE_TAG_NAME the_file To perform a "repocopy" (which retains history,) in the repository directory on the server: cp -p file1,v file2,v XXX add note that old tags need to be removed/renamed so that the newly copied file appears on other branches. # Leaf The following hints are intended to be used on the developer machine, leaf.dragonflybsd.org. Obviously, access to leaf requires a leaf account. `See also`: [[Volume 4: Resources for DragonFly BSD Developers]] `Note`: When connecting to leaf, be sure to use ssh -A to allow for ssh agent forwarding, so that commits to crater can be performed. To begin, you probably want a work area that looks like a root filesystem, and a directory that looks like a usr partition: setenv ROOT $HOME/root mkdir -p $ROOT/usr && cd $ROOT/usr `Note`: You cannot use ~ as a shortcut for $HOME in the above. To check out DragonFly sources, read-only: cvs -R -d/cvs checkout -P src cvs -d crater:/cvs commit To check out DragonFly sources, read/write: cvs -d crater:/cvs co src cvs -d crater:/cvs commit To build world: setenv ME `id -nu` setenv US `id -gn` env - \ __MAKE_CONF=/dev/null \ MAKEOBJDIRPREFIX=$ROOT/usr/obj \ KERNCONFDIR=/where/you/keep/config/files \ KERNCONF=YOURCONFIG \ make buildworld buildkernel If KERNCONF and KERNCONFDIR are omitted, the GENERIC kernel will be used. To install world: env - \ __MAKE_CONF=/dev/null \ DESTDIR=$ROOT \ MAKEOBJDIRPREFIX=$ROOT/usr/obj \ KERNCONFDIR=/where/you/keep/config/files \ KERNCONF=YOURCONFIG \ INSTALL="sh `pwd`/tools/install.sh" \ BINOWN#$ME BINGRP$US SHAREOWN=$ME SHAREGRP=$US \ make installworld installkernel # Building Releases Note that each of these requires a copy of the DragonFly source tree checked out to /usr/src. Everything is done within /usr/src/nrelease, so first: cd /usr/src/nrelease To fetch the needed packages for making a release: make fetchpkgs To build a release: make release If you have built world and kernel recently, you can build a release without rebuilding them: make realquickrel Versions of the above commands for building a release with the installer on it: make installer_fetchpkgs make installer_release make installer_realquickrel To install additional packages on the release: make release EXTRA_PACKAGES="foo-1.0 bar-2.3e" To install additional packages after a release has already been made, and regenerate the ISO: make pkgaddiso EXTRA_PACKAGES="foo-1.0 bar-2.3e" && make mkiso To remove all packages from the release tree, and regenerate the ISO: make pkgcleaniso EXTRA_PACKAGES="'*'" && make mkiso # Misc If you're building from CVS or working on pkgsrc ports, you will want debugging symbols in your DragonFly binaries and so libs. Set STRIP to an empty string in /etc/make.conf to prevent install(1) from stripping symbols at installation time. STRIP=*** To continue an interrupted buildworld without blowing away your progress so far: make buildworld -DNOCLEAN make realquickworld -DNOCLEAN To delete multiple files listed in a textfile: xargs rm -rf < README.DELETED To delete from cvs multiple files listed in a textfile: xargs rm -rf < README.DELETED xargs cvs rm -rf < README.DELETED To preview a manual page without installing it: nroff -t -man foo.8 | more # Booting options To boot with both serial and vga: (this is also known to boot with serial only on certain boards) boot -Dh