Fix a seg-fault if -l is used without a /dev prefix, e.g. cu -l cuaa0. Of
[dragonfly.git] / UPDATING
... / ...
CommitLineData
1$DragonFly: src/UPDATING,v 1.7 2004/04/22 23:24:19 dillon Exp $
2
3Updating Information for DragonFly users.
4
5This file should warn you of any pitfalls which you might need to work around
6when trying to update your DragonFly system.
7
8If you discover any problem, please contact the bugs@lists.dragonflybsd.org
9mailing list with the details.
10
11------------------------------------------------------------------------------
12
13> Upgrading to DragonFly from FreeBSD
14---------------------
15
16You can build the DragonFly world and DragonFly kernels on a FreeBSD-4.x or
17FreeBSD-5.x machine and then install DragonFly over FreeBSD, replacing
18FreeBSD. Note that the DragonFly buildworld target does not try to reuse
19make depend information, it starts from scratch, so no pre-cleaning of the
20object hierarchy is necessary.
21
22 # get the CVS pository (it is placed in /home/dcvs, 500MB).
23 # Please use the -h option and a mirror site to pull the
24 # initial repository, but feel free to use the main repository
25 # machine to pull updates.
26 cvsup /usr/share/examples/cvsup/DragonFly-supfile
27 # install the source from the CVS hierarchy (remove preexisting
28 # FreeBSD src first) (500MB)
29 cd /usr
30 rm -rf src
31 cvs -R -d /home/dcvs checkout src
32 cvs -R -d /home/dcvs checkout dfports
33
34 # build it (500MB used in /usr/obj)
35 #
36 cd /usr/src
37 make buildworld
38 make buildkernel KERNCONF=<KERNELNAME>
39
40Once you have built DragonFly you have to install it over FreeBSD. Since
41DragonFly does not track changes made by FreeBSD to its include file
42hierarchy and include file pollution can cause all sorts of unexpected
43compilation issues to come up, it is best to wipe your include hierarchy
44prior to installing DragonFly. Note that you should not wipe any installed
45FreeBSD header files or binaries until after you have successfully completed
46the build steps above.
47
48 rm -rf /usr/include
49 mkdir /usr/include
50 make installkernel KERNCONF=<KERNELNAME>
51 make installworld
52
53Then you need to upgrade your /etc. DragonFly's 'make upgrade' target
54will unconditionally upgrade the /etc files that sysops do not usually
55mess around with, such as the files in /etc/rc.d. If you are unsure we
56recommend that you make a backup of your /etc before applying this step.
57Note that DragonFly's RC system is basically RCNG from FreeBSD-5, but
58there are some differences in the contents of the RC files.
59
60 make upgrade
61
62Finally we recommend that you do an 'ls -lta BLAH' for /bin, /sbin, /usr/bin,
63/usr/bin, and /usr/lib, and remove any stale files that you find.
64
65------------------------------------------------------------------------------
66
67> Upgrading DragonFly on an existing DragonFly system.
68---------------------
69
70The best way to upgrade DragonFly is to maintain a copy of the DragonFly
71CVS repository via cvsup and to checkout the source base and DragonFly
72ports via this repository. The repository is stored in /home/dcvs by
73default and requires about 500MB of disk space. The checked out source
74tree (/usr/src) requires about 500MB of disk space, and the build will
75eat around 500MB of space out of /usr/obj. To maintain the build you
76should reserve at least 2GB of disk space, and 3GB if you have the space.
77
78Note: most people run cvsup via a root cron job to keep the repository up to
79date. Please limit such automatic updates to once a day and try to randomize
80the hour and minute in the cron job a bit to avoid pileups.
81
82 # get the CVS pository (it is placed in /home/dcvs)
83 cvsup /usr/share/examples/cvsup/DragonFly-supfile
84 # install the source from the CVS hierarchy
85 cd /usr
86 cvs -R -d /home/dcvs checkout src
87 cvs -R -d /home/dcvs checkout dfports
88
89Once you have the repository and broken out sources you can decide whether to
90update your sources from the repository automatically or manually. Since
91you are tracking changes made to DragonFly, it is usually a good idea to
92update the sources manually:
93
94 cd /usr/src
95 cvs update
96
97To upgrade a DragonFly system from sources you run the following sequence:
98
99 cd /usr/src
100 make buildworld
101 make buildkernel KERNCONF=<KERNELNAME>
102 make installkernel KERNCONF=<KERNELNAME>
103 make installworld
104
105You will also want to run the 'upgrade' target to upgrade your /etc. The
106upgrade target is aware of stale files created by older DragonFly
107installations and should delete them automatically.
108
109 make upgrade
110
111If you are using 'config' manually from /usr/src/sys/i386/conf/BLAH, note
112that the build will use the current DragonFly environment rather then
113the post-build environment from the last buildworld. For this reason manual
114configs are discouraged. The proper way to build a kernel is to use the
115'buildkernel' or 'quickkernel' target in /usr/src.
116
117Once you've done a full build of the world and kernel you can do incremental
118upgrades of either by using the 'quickworld' and 'quickkernel' targets
119instead of 'buildworld' and 'buildkernel'. If you have any problems with
120the quick targets, try doing a cvsup, cvs update, and then a full buildworld
121and buildkernel as shown above, before asking for help.
122
123> Kerberos IV
124-------------
125
126Kerberos IV (eBones) was removed from the tree, please consider moving to
127Kerberos 5 (Heimdal).
128
129> FreeBSD and DragonFly ports
130-----------------------------
131
132DragonFly will eventually have its own package management system but at the
133moment we leverage off of the FreeBSD ports system. You should maintain
134/usr/ports from the FreeBSD cvs repository via cvsup just like you do now.
135
136DragonFly has its own 'port overrides' hierarchy in /usr/dfports. You can
137check this out of the DragonFly cvs repository using:
138
139cd /usr
140cvs -R -d /cvs checkout dfports
141
142You may wish to use a consolidated distfiles directory, in which case you
143should make /usr/dfports/distfiles a softlink to your existing distfiles
144directory (typically /usr/ports/distfiles).
145
146Be sure that you have installed 'relpath' from the DragonFly sources
147(/usr/src/usr.bin/relpath) as well as the updated /usr/share/mk files from
148/usr/src/share/mk. As a test you can cd into /usr/ports/sysutils/cpdup and
149build the port. Dragonfly should contain an override and you should see a
150warning message that the DragonFly override is being build instead when you
151build it from the FreeBSD ports.
152