Fix LINT kernel; spin_lock function definitions have been split into
[dragonfly.git] / UPDATING
... / ...
CommitLineData
1$DragonFly: src/UPDATING,v 1.15 2005/09/06 10:56:05 joerg 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> Updating from pre-1.2 systems or FreeBSD 4.x to DragonFly 1.3+ (either
14 PREVIEW or HEAD)
15---------------------
16
17The compatiblity shims for the build environment have been removed, you
18have to update to DragonFly 1.2 release branch first.
19
20The default PAM configuration has moved from /etc/pam.conf to /etc/pam.d/.
21The existing configuration can be converted using /etc/pam.d/convert.sh.
22Entries in /etc/pam.d/ override entries in /etc/pam.conf. In addition
23the pam_skey.so module was retired, you have to remove it manually from
24your configuration, when you convert it.
25
26> Required user and group IDs when upgrading from either FreeBSD or DragonFly
27---------------------
28
29The following users may be missing from your password file. Use vipw and
30add any that are missing:
31
32smmsp:*:25:25::0:0:Sendmail Submission User:/var/spool/clientmqueue:/sbin/nologin
33_pflogd:*:64:64::0:0:pflogd privsep user:/var/empty:/sbin/nologin
34_ntp:*:65:65::0:0:ntpd privsep user:/var/empty:/sbin/nologin
35
36The following groups may be missing from your group file. Use vi /etc/group
37and add any that are missing:
38
39smmsp:*:25:
40authpf:*:63:
41_pflogd:*:64:
42_ntp:*:65:
43
44
45> Upgrading to DragonFly from FreeBSD
46---------------------
47
48You can build the DragonFly world and DragonFly kernels on a FreeBSD-4.x or
49FreeBSD-5.x machine and then install DragonFly over FreeBSD, replacing
50FreeBSD. Note that the DragonFly buildworld target does not try to reuse
51make depend information, it starts from scratch, so no pre-cleaning of the
52object hierarchy is necessary.
53
54 # get the CVS repository (it is placed in /home/dcvs, 500MB).
55 # Please use the -h option and a mirror site to pull the
56 # initial repository, but feel free to use the main repository
57 # machine to pull updates.
58 cvsup /usr/share/examples/cvsup/DragonFly-cvs-supfile
59 # install the source from the CVS hierarchy (remove preexisting
60 # FreeBSD src first) (500MB)
61 cd /usr
62 rm -rf src
63 cvs -R -d /home/dcvs checkout src
64 cvs -R -d /home/dcvs checkout dfports
65
66 # build it (500MB used in /usr/obj)
67 #
68 cd /usr/src
69 make buildworld
70 make buildkernel KERNCONF=<KERNELNAME>
71
72Once you have built DragonFly you have to install it over FreeBSD. Since
73DragonFly does not track changes made by FreeBSD to its include file
74hierarchy and include file pollution can cause all sorts of unexpected
75compilation issues to come up, it is best to wipe your include hierarchy
76prior to installing DragonFly. Note that you should not wipe any installed
77FreeBSD header files or binaries until after you have successfully completed
78the build steps above.
79
80 rm -rf /usr/include
81 mkdir /usr/include
82 make installkernel KERNCONF=<KERNELNAME>
83 make installworld
84
85Then you need to upgrade your /etc. DragonFly's 'make upgrade' target
86will unconditionally upgrade the /etc files that sysops do not usually
87mess around with, such as the files in /etc/rc.d. If you are unsure we
88recommend that you make a backup of your /etc before applying this step.
89Note that DragonFly's RC system is basically RCNG from FreeBSD-5, but
90there are some differences in the contents of the RC files.
91
92 make upgrade
93
94Finally we recommend that you do an 'ls -lta BLAH' for /bin, /sbin, /usr/bin,
95/usr/bin, and /usr/lib, and remove any stale files that you find.
96
97------------------------------------------------------------------------------
98
99> Upgrading DragonFly on an existing DragonFly system.
100---------------------
101
102The best way to upgrade DragonFly is to maintain a copy of the DragonFly
103CVS repository via cvsup and to checkout the source base and DragonFly
104ports via this repository. The repository is stored in /home/dcvs by
105default and requires about 500MB of disk space. The checked out source
106tree (/usr/src) requires about 500MB of disk space, and the build will
107eat around 500MB of space out of /usr/obj. To maintain the build you
108should reserve at least 2GB of disk space, and 3GB if you have the space.
109
110Note: most people run cvsup via a root cron job to keep the repository up to
111date. Please limit such automatic updates to once a day and try to randomize
112the hour and minute in the cron job a bit to avoid pileups.
113
114 # get the CVS repository (it is placed in /home/dcvs)
115 cvsup /usr/share/examples/cvsup/DragonFly-cvs-supfile
116 # install the source from the CVS hierarchy
117 cd /usr
118 cvs -R -d /home/dcvs checkout -P src
119 cvs -R -d /home/dcvs checkout -P dfports
120
121Once you have the repository and broken out sources you can decide whether to
122update your sources from the repository automatically or manually. Since
123you are tracking changes made to DragonFly, it is usually a good idea to
124update the sources manually:
125
126 cd /usr/src
127 cvs update -dP
128
129To upgrade a DragonFly system from sources you run the following sequence:
130
131 cd /usr/src
132 make buildworld
133 make buildkernel KERNCONF=<KERNELNAME>
134 make installkernel KERNCONF=<KERNELNAME>
135 make installworld
136
137You will also want to run the 'upgrade' target to upgrade your /etc. The
138upgrade target is aware of stale files created by older DragonFly
139installations and should delete them automatically.
140
141 make upgrade
142
143If you are using 'config' manually from /usr/src/sys/i386/conf/BLAH, note
144that the build will use the current DragonFly environment rather then
145the post-build environment from the last buildworld. For this reason manual
146configs are discouraged. The proper way to build a kernel is to use the
147'buildkernel' or 'quickkernel' target in /usr/src.
148
149Once you've done a full build of the world and kernel you can do incremental
150upgrades of either by using the 'quickworld' and 'quickkernel' targets
151instead of 'buildworld' and 'buildkernel'. If you have any problems with
152the quick targets, try doing a cvsup, cvs update, and then a full buildworld
153and buildkernel as shown above, before asking for help.
154
155> Kerberos IV
156-------------
157
158Kerberos IV (eBones) was removed from the tree, please consider moving to
159Kerberos 5 (Heimdal).
160
161> FreeBSD and DragonFly ports
162-----------------------------
163
164DragonFly will eventually have its own package management system but at the
165moment we leverage off of the FreeBSD ports system. You should maintain
166/usr/ports from the FreeBSD cvs repository via cvsup just like you do now.
167
168DragonFly has its own 'port overrides' hierarchy in /usr/dfports. You can
169check this out of the DragonFly cvs repository using:
170
171cd /usr
172cvs -R -d /home/dcvs checkout -P dfports
173
174Be sure that you have installed 'relpath' from the DragonFly sources
175(/usr/src/usr.bin/relpath) as well as the updated /usr/share/mk files from
176/usr/src/share/mk. As a test you can cd into /usr/ports/sysutils/cpdup and
177build the port. Dragonfly should contain an override and you should see a
178warning message that the DragonFly override is being build instead when you
179build it from the FreeBSD ports.
180