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