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