| 1 | $DragonFly: src/UPDATING,v 1.21 2006/08/12 22:34:23 swildner Exp $ |
| 2 | |
| 3 | Updating Information for DragonFly users. |
| 4 | |
| 5 | This file should warn you of any pitfalls which you might need to work around |
| 6 | when trying to update your DragonFly system. |
| 7 | |
| 8 | If you discover any problem, please contact the bugs@lists.dragonflybsd.org |
| 9 | mailing 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 | |
| 17 | The compatibility shims for the build environment have been removed, you |
| 18 | have to update to DragonFly 1.2 release branch first. |
| 19 | |
| 20 | The default PAM configuration has moved from /etc/pam.conf to /etc/pam.d/. |
| 21 | The existing configuration can be converted using /etc/pam.d/convert.sh. |
| 22 | Entries in /etc/pam.d/ override entries in /etc/pam.conf. In addition |
| 23 | the pam_skey.so module was retired, you have to remove it manually from |
| 24 | your configuration, when you convert it. |
| 25 | |
| 26 | > Required user and group IDs when upgrading from either FreeBSD or DragonFly |
| 27 | --------------------- |
| 28 | |
| 29 | The following users may be missing from your password file. Use vipw and |
| 30 | add any that are missing: |
| 31 | |
| 32 | smmsp:*: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 | |
| 36 | The following groups may be missing from your group file. Use vi /etc/group |
| 37 | and add any that are missing: |
| 38 | |
| 39 | smmsp:*:25: |
| 40 | authpf:*:63: |
| 41 | _pflogd:*:64: |
| 42 | _ntp:*:65: |
| 43 | |
| 44 | |
| 45 | > Upgrading to DragonFly from FreeBSD |
| 46 | --------------------- |
| 47 | |
| 48 | You can build the DragonFly world and DragonFly kernels on a FreeBSD-4.x or |
| 49 | FreeBSD-5.x machine and then install DragonFly over FreeBSD, replacing |
| 50 | FreeBSD. Note that the DragonFly buildworld target does not try to reuse |
| 51 | make depend information, it starts from scratch, so no pre-cleaning of the |
| 52 | object 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 -P src |
| 64 | |
| 65 | # build it (500MB used in /usr/obj) |
| 66 | # |
| 67 | cd /usr/src |
| 68 | make buildworld |
| 69 | make buildkernel KERNCONF=<KERNELNAME> |
| 70 | |
| 71 | Once you have built DragonFly you have to install it over FreeBSD. Since |
| 72 | DragonFly does not track changes made by FreeBSD to its include file |
| 73 | hierarchy and include file pollution can cause all sorts of unexpected |
| 74 | compilation issues to come up, it is best to wipe your include hierarchy |
| 75 | prior to installing DragonFly. Note that you should not wipe any installed |
| 76 | FreeBSD header files or binaries until after you have successfully completed |
| 77 | the build steps above. |
| 78 | |
| 79 | rm -rf /usr/include |
| 80 | mkdir /usr/include |
| 81 | make installkernel KERNCONF=<KERNELNAME> |
| 82 | make installworld |
| 83 | |
| 84 | Then you need to upgrade your system. DragonFly's 'make upgrade' target |
| 85 | will unconditionally upgrade the /etc files that sysops do not usually |
| 86 | mess around with, such as the files in /etc/rc.d. It will also remove any |
| 87 | obsolete files such as utilities and manpages that have been removed from |
| 88 | the system since the version you're coming from. If you are unsure we |
| 89 | recommend that you make a backup of at least your /etc before applying |
| 90 | this step. Note that DragonFly's RC system is basically RCNG from |
| 91 | FreeBSD-5, but there are some differences in the contents of the RC files. |
| 92 | |
| 93 | make upgrade |
| 94 | |
| 95 | NOTE! Never do a 'make upgrade' before 'make installworld' has been run. |
| 96 | Doing so might leave your system in an unusable state. |
| 97 | |
| 98 | Finally we recommend that you do an 'ls -lta BLAH' for /bin, /sbin, /usr/bin, |
| 99 | /usr/bin, and /usr/lib, and remove any stale files that you find. Please |
| 100 | report these files to the DragonFly developers so that they can be added to |
| 101 | the 'upgrade' target. |
| 102 | |
| 103 | ------------------------------------------------------------------------------ |
| 104 | |
| 105 | > Upgrading DragonFly on an existing DragonFly system. |
| 106 | --------------------- |
| 107 | |
| 108 | The best way to upgrade DragonFly is to maintain a copy of the DragonFly |
| 109 | CVS repository via cvsup and to checkout the source base via this repository. |
| 110 | The repository is stored in /home/dcvs by default and requires about 800MB |
| 111 | of disk space. The checked out source tree (/usr/src) requires about 400MB |
| 112 | of disk space, and the build will eat around 800MB of space out of /usr/obj. |
| 113 | To maintain the build you should reserve at least 2.5GB of disk space, and |
| 114 | 3.5GB if you have the space. |
| 115 | |
| 116 | Note: most people run cvsup via a root cron job to keep the repository up to |
| 117 | date. Please limit such automatic updates to once a day and try to randomize |
| 118 | the hour and minute in the cron job a bit to avoid pileups. |
| 119 | |
| 120 | # get the CVS repository (it is placed in /home/dcvs) |
| 121 | cvsup /usr/share/examples/cvsup/DragonFly-cvs-supfile |
| 122 | # install the source from the CVS hierarchy |
| 123 | cd /usr |
| 124 | cvs -R -d /home/dcvs checkout -P src |
| 125 | |
| 126 | Once you have the repository and broken out sources you can decide whether to |
| 127 | update your sources from the repository automatically or manually. Since |
| 128 | you are tracking changes made to DragonFly, it is usually a good idea to |
| 129 | update the sources manually: |
| 130 | |
| 131 | cd /usr/src |
| 132 | cvs update -dP |
| 133 | |
| 134 | To upgrade a DragonFly system from sources you run the following sequence: |
| 135 | |
| 136 | cd /usr/src |
| 137 | make buildworld |
| 138 | make buildkernel KERNCONF=<KERNELNAME> |
| 139 | make installkernel KERNCONF=<KERNELNAME> |
| 140 | make installworld |
| 141 | |
| 142 | You will also want to run the 'upgrade' target to upgrade your /etc and the |
| 143 | rest of your system. The upgrade target is aware of stale files created by |
| 144 | older DragonFly installations and should delete them automatically. |
| 145 | |
| 146 | make upgrade |
| 147 | |
| 148 | NOTE! Never do a 'make upgrade' before 'make installworld' has been run. |
| 149 | Doing so might leave your system in an unusable state. |
| 150 | |
| 151 | If you are using 'config' manually from /usr/src/sys/i386/conf/BLAH, note |
| 152 | that the build will use the current DragonFly environment rather than |
| 153 | the post-build environment from the last buildworld. For this reason manual |
| 154 | configs are discouraged. The proper way to build a kernel is to use the |
| 155 | 'buildkernel' or 'quickkernel' target in /usr/src. |
| 156 | |
| 157 | Once you've done a full build of the world and kernel you can do incremental |
| 158 | upgrades of either by using the 'quickworld' and 'quickkernel' targets |
| 159 | instead of 'buildworld' and 'buildkernel'. If you have any problems with |
| 160 | the quick targets, try doing a cvsup, cvs update, and then a full buildworld |
| 161 | and buildkernel as shown above, before asking for help. |
| 162 | |
| 163 | > Kerberos IV |
| 164 | ------------- |
| 165 | |
| 166 | Kerberos IV (eBones) was removed from the tree, please consider moving to |
| 167 | Kerberos 5 (Heimdal). |
| 168 | |
| 169 | > Package Management System |
| 170 | --------------------------- |
| 171 | |
| 172 | Starting with the 1.4 release, DragonFly uses NetBSD's pkgsrc package |
| 173 | management system. The necessary tools to build and maintain packages |
| 174 | are provided in /usr/pkg/bin and /usr/pkg/sbin. Make sure that these |
| 175 | directories are in your PATH variable. |
| 176 | |
| 177 | In order to obtain a reasonably current snapshot of the pkgsrc tree, use |
| 178 | the tarball from NetBSD: |
| 179 | |
| 180 | fetch -o /tmp/pkgsrc.tar.gz ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc.tar.gz |
| 181 | cd /usr; tar -xzf /tmp/pkgsrc.tar.gz; chown -R root:wheel pkgsrc |
| 182 | |
| 183 | This tree can then be kept up to date with cvs update: |
| 184 | |
| 185 | cd /usr/pkgsrc; cvs up |
| 186 | |
| 187 | NOTE! If you upgraded from a pre-1.4 system to 1.4 or later, you need to |
| 188 | build and install the pkgsrc bootstrap manually: |
| 189 | |
| 190 | cd /usr/pkgsrc/bootstrap |
| 191 | ./bootstrap --pkgdbdir /var/db/pkg --prefix /usr/pkg |