1 # Handy hints for DragonFly developers
\r
3 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.
\r
5 `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.
\r
7 `Note`: A backslash at the end of a line indicates a wrapped line; there is no need to actually type it.
\r
9 `Note`: You can type your username instead of `whoami` where it appears in the following example (since your username is what `whoami` generates anyway.)
\r
18 To check out a copy of the DragonFly sources from your local CVS repository in /home/dcvs:
\r
20 cvs -d /home/dcvs update -Pd src
\r
22 or even better, create a ~/.cvsrc file with:
\r
30 To add a bunch of files to CVS at once:
\r
32 find . \! -path '*/CVS*' | xargs cvs add
\r
35 To add a (simple, non-branch) tag to an entire module:
\r
37 cvs rtag THE_TAG_NAME the_module
\r
40 To slip an existing tag to the HEAD revision of a specific file (be careful!):
\r
42 cvs tag -F THE_TAG_NAME the_file
\r
44 To completely remove a tag from a file (again, be careful!):
\r
46 cvs tag -d THE_TAG_NAME the_file
\r
49 To perform a "repocopy" (which retains history,) in the repository directory on the server:
\r
51 cp -p file1,v file2,v
\r
54 XXX add note that old tags need to be removed/renamed so that the newly copied file appears on other branches.
\r
58 The following hints are intended to be used on the developer machine, leaf.dragonflybsd.org. Obviously, access to leaf requires a leaf account.
\r
60 `See also`: [[Volume 4: Resources for DragonFly BSD Developers]]
\r
62 `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.
\r
64 To begin, you probably want a work area that looks like a root filesystem, and a directory that looks like a usr partition:
\r
66 setenv ROOT $HOME/root
\r
67 mkdir -p $ROOT/usr && cd $ROOT/usr
\r
69 `Note`: You cannot use ~ as a shortcut for $HOME in the above.
\r
71 To check out DragonFly sources, read-only:
\r
73 cvs -R -d/cvs checkout -P src
\r
74 cvs -d crater:/cvs commit
\r
76 To check out DragonFly sources, read/write:
\r
78 cvs -d crater:/cvs co src
\r
79 cvs -d crater:/cvs commit
\r
86 __MAKE_CONF=/dev/null \
\r
87 MAKEOBJDIRPREFIX=$ROOT/usr/obj \
\r
88 KERNCONFDIR=/where/you/keep/config/files \
\r
89 KERNCONF=YOURCONFIG \
\r
90 make buildworld buildkernel
\r
92 If KERNCONF and KERNCONFDIR are omitted, the GENERIC kernel will be used.
\r
97 __MAKE_CONF=/dev/null \
\r
99 MAKEOBJDIRPREFIX=$ROOT/usr/obj \
\r
100 KERNCONFDIR=/where/you/keep/config/files \
\r
101 KERNCONF=YOURCONFIG \
\r
102 INSTALL="sh `pwd`/tools/install.sh" \
\r
103 BINOWN#$ME BINGRP$US SHAREOWN=$ME SHAREGRP=$US \
\r
104 make installworld installkernel
\r
106 # Building Releases
\r
108 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:
\r
110 cd /usr/src/nrelease
\r
113 To fetch the needed packages for making a release:
\r
118 To build a release:
\r
123 If you have built world and kernel recently, you can build a release without rebuilding them:
\r
127 Versions of the above commands for building a release with the installer on it:
\r
129 make installer_fetchpkgs
\r
130 make installer_release
\r
131 make installer_realquickrel
\r
134 To install additional packages on the release:
\r
136 make release EXTRA_PACKAGES="foo-1.0 bar-2.3e"
\r
139 To install additional packages after a release has already been made, and regenerate the ISO:
\r
141 make pkgaddiso EXTRA_PACKAGES="foo-1.0 bar-2.3e" && make mkiso
\r
144 To remove all packages from the release tree, and regenerate the ISO:
\r
146 make pkgcleaniso EXTRA_PACKAGES="'*'" && make mkiso
\r
151 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.
\r
156 To continue an interrupted buildworld without blowing away your progress so far:
\r
158 make buildworld -DNOCLEAN
\r
159 make realquickworld -DNOCLEAN
\r
162 To delete multiple files listed in a textfile:
\r
164 xargs rm -rf < README.DELETED
\r
167 To delete from cvs multiple files listed in a textfile:
\r
169 xargs rm -rf < README.DELETED
\r
170 xargs cvs rm -rf < README.DELETED
\r
173 To preview a manual page without installing it:
\r
175 nroff -t -man foo.8 | more
\r
180 To boot with both serial and vga: (this is also known to boot with serial only on certain boards)
\r