mtree(8): Use getcwd().
[dragonfly.git] / UPDATING
1 # Updating Information for DragonFly users.
2 #
3 #
4 # This file should warn you of any pitfalls which you might need to work around
5 # when trying to update your DragonFly system.  The information below is
6 # in reverse-time order, with the latest information at the top.
7 #
8 # If you discover any problem, please contact the bugs@lists.dragonflybsd.org
9 # mailing list with the details.
10
11 +-----------------------------------------------------------------------+
12 +         UPGRADING DRAGONFLY FROM 4.6 TO LATER VERSIONS                +
13 +-----------------------------------------------------------------------+
14
15 COMPAT_43 KERNEL OPTION REMOVED
16 -------------------------------
17
18 It was commented out in our default configs for several years now, but
19 might still be present in custom configs created before Nov. 2011.
20
21 OPENSSL REMOVED
22 ---------------
23
24 OpenSSL has been removed from base and replaced with a private version of
25 LibreSSL.  The previously installed OpenSSL libraries, headers, and man
26 pages will remain on the system unless the "make upgrade" command is
27 specifically instructed to remove them.  To do this, define
28 REMOVE_OPENSSL_FILES for the upgrade command, e.g.
29 "make upgrade REMOVE_OPENSSL_FILES=yes"
30
31 It is recommended that the OpenSSL files be removed to avoid configuration
32 scripts from using the stale and potentially vulnerable version, but all
33 binaries that are dynamically linked to the OpenSSL libraries should be
34 rebuilt first to avoid breakage.
35
36 16 Oct 2016: The OpenSSL sources and makefiles haven't been removed yet.
37 They can still be built by putting "FORCE_OPENSSL=yes" in make.conf.
38 This feature will likely be removed within a month, and definitely
39 before the release of DF 4.8.
40
41 CS, EX AND VX DRIVERS REMOVED
42 -----------------------------
43
44 The cs(4), ex(4) and vx(4) drivers have been removed. They were very
45 old and its doubtful they ever worked properly in x86_64 but they were
46 in X86_64_GENERIC, so custom configurations derived from it have to be
47 adjusted.
48
49 +-----------------------------------------------------------------------+
50 +         UPGRADING DRAGONFLY FROM 4.4 TO LATER VERSIONS                +
51 +-----------------------------------------------------------------------+
52
53 AMD REMOVED
54 -----------
55
56 The am-utils automounter suite has been removed. It stopped working
57 at some point and was never fixed. autofs(5) and the associated
58 userland has been brought in from FreeBSD and replaces it.
59
60 AN DRIVER REMOVED
61 -----------------
62
63 The an(4) driver has been removed. It was in the X86_64_GENERIC kernel
64 config file, so any configurations derived from it have to be adjusted.
65
66 /DEV/DRI GROUP CHANGED
67 ----------------------
68
69 The default group assigned to /dev/dri entries has been changed
70 from 'wheel' to 'video' with the id of '44'. If you want to have
71 access to the dri devices please add yourself to the video group
72 with:
73
74 # pw groupmod video -m $USER
75
76 +-----------------------------------------------------------------------+
77 +         UPGRADING DRAGONFLY FROM 4.2 TO LATER VERSIONS                +
78 +-----------------------------------------------------------------------+
79
80 DSCHED REMOVED
81 --------------
82
83 dsched(4) has been removed and one of its kernel options, DSCHED_FQ, was
84 in our default kernel config file. So the DSCHED_FQ option has been turned
85 into a no-op for now and can be removed from custom configurations.
86
87 EST DRIVER REMOVED, COMPILE_ET AND LIBCOM_ERR TOO
88 -------------------------------------------------
89
90 The est(4) driver has been removed. All CPUs it supported (except one)
91 were 32 bits only. Those who are still using the Core 2 Duo T7500 should
92 report back if there are any issues with this CPU and our regular ACPI
93 P-state support.
94
95 Also, compile_et(1) and com_err(3) have been removed as well. They
96 should have been removed along with kerberos support, back in 2009.
97
98 SEVERAL LOCALES RENAMED
99 -----------------------
100
101 Several locales were using obsolete and misleading names, and thus have
102 been adjusted to current standards. Any users of the following locales
103 need to select alternates:
104
105 DFLY 4.2 locale            DFLY 4.4 alterative locale
106 ---------------            ------------------------------------
107 mn_MN.UTF-8                mn_Cyrl_MN.UTF-8
108 no_NO.UTF-8                nb_NO.UTF-8      or nn_NO.UTF-8
109 no_NO.ISO8859-1            nb_NO.ISO8869-1  or nn_NO.ISO8859-1
110 no_NO.ISO8859-15           nb_NO.ISO8859-15 or nn_NO.ISO8859-15
111 sr_YU.UTF-8                sr_Cyrl_RS.UTF-8 or sr_Latn_RS.UTF-8
112 sr_YU.ISO8859-5            sr_Cyrl_RS.ISO8859-5
113 sr_YU.ISO8859-2            sr_Latn_RS.ISO8859-2
114 zh_CN.GBK                  zh_Hans_CN.GBK
115 zh_CN.UTF-8                zh_Hans_CN.UTF-8
116 zh_CN.eucCN                zh_Hans_CN.eucCN
117 zh_CN.GB2312               zh_Hans_CH.GB2312
118 zh_CN.GB18030              zh_Hans_CH.GB18030
119 zh_HK.Big5HKSCS            zh_Hant_HK.Big5HKSCS
120 zh_HK.UTF_8                zh_Hant_HK.UTF-8
121 zh_TW.Big5                 zh_Hant_TW.Big5
122 zh_TW.UTF-8                zh_Hant_TW.UTF-8
123
124 +-----------------------------------------------------------------------+
125 +         UPGRADING DRAGONFLY FROM 4.0 TO LATER VERSIONS                +
126 +-----------------------------------------------------------------------+
127
128 BINUTILS 2.25 REPLACES 2.22, PRIMARY
129 ------------------------------------
130
131 The oldest of the two versions of Binutils, version 2.22, was removed
132 and replaced with Binutils 2.25.  It becomes the primary version version
133 of binutils and version 2.24 becomes the alternate.  There are 8 current
134 CVE written against 2.24, so for security reasons version 2.25 should
135 always be used.
136
137 The accepted values of BINUTILSVER are now "binutils225" (default) and
138 "binutils224".  The building of Binutils 2.24 can be prevented by setting
139 NO_ALTBINUTILS=yes in make.conf.
140
141 LOADER OPTIONS CHANGED
142 ----------------------
143
144 Right after the development branch started, the Fred art accompanying the
145 loader menu was improved.  The line between Fred and the menu was removed
146 by default (but can optionally be returned) and the placement shifted as
147 a result.  The drawing was improved, and the colored version was improved,
148 changing the eyes and wing color from white to red.  A new color version
149 of Fred was added, one with a blue scheme.
150
151 The loader menu defaults have changed since release 4.0:  The vertical
152 line was removed, the loader is displayed in color by default*, and the
153 blue scheme is used.
154
155 The loader.conf changes are:
156 loader_color:   option has been removed
157 loader_plain:   option has been added, it changed menu to monochrome
158 fred_is_red:    changes color scheme from blue to red
159 fred_is_blue:   option existed only on 4.1, it has been removed
160 fred_separated: Adds line between Fred and menu (as seen previously)
161
162 * If loader.conf defines "console" as "comconsole" or "console" is defined
163   in the environment as "comconsole" then color will not be displayed,
164   even if loader_plain value is "NO".
165
166 SENDMAIL REMOVED FROM BASE
167 --------------------------
168
169 The only Mail Transfer Agent provided now is DragonFly Mail Agent (dma).
170 If the system being upgraded is still configured to use the sendmail
171 binaries from base, the "make upgrade" command will fail.
172
173 The administrator must change /etc/mail/mailer.conf to switch the
174 mailwrapper to dma or a DPorts-based MTA prior to running the upgrade
175 command that permanently removes sendmail executables and could
176 potentially break a running mail server.
177
178 Refer: http://www.dragonflybsd.com/docs/docs/newhandbook/mta/ for
179 detailed instructions on how to configure the MTA selection.
180
181 _KPOSIX_VERSION and P1003_1B OPTIONS REMOVED
182 --------------------------------------------
183
184 The _KPOSIX_VERSION and P1003_1B kernel options have been changed to
185 no-ops. They can be removed from custom kernel configurations.
186
187 SOUND SYSTEM UPDATED FROM FreeBSD 11-CURRENT
188 --------------------------------------------
189
190 Many more sound devices may be detected.
191
192 If the default device choosen isn't to your liking, setting the sysctl
193 hw.snd.default_unit to a different number will change it.
194
195 SCTP SUPPORT DROPPED
196 --------------------
197
198 Support for the SCTP protocol has been removed.
199
200 OLD USB DRIVERS REMOVED
201 -----------------------
202
203 The old USB stack, along with the kernel config option "device oldusb"
204 and the make.conf variable "WANT_OLDUSB" have been removed. This means
205 that for custom kernel configuration files which were derived from a
206 GENERIC or X86_64_GENERIC file prior to making the usb4bsd stack default,
207 various (old USB stack specific) devices will now complain about being
208 unknown:
209
210   * oldusb      (obviously)
211   * natausb     (not yet ported to usb4bsd)
212   * rue         (not yet ported to usb4bsd)
213   * ugen        (no longer needed in usb4bsd)
214   * urio        (not yet ported to usb4bsd)
215   * uscanner    (no longer needed in usb4bsd)
216
217 They should be removed or commented out in such custom kernel configs.
218
219 GCC 5
220 -----
221
222 The GCC 4.4 compiler has been retired.  It has been replaced by a GCC 5.1.
223 The following make.conf variables no longer work: NO_GCC44, NO_OBJC, and
224 NO_CXX.  The latter was never documented and the latest versions of GCC are
225 partially written in C++ so a C++ compiler is no longer optional.  In
226 practical terms it has not been optional for many years as other base
227 components are also written in C++.  The resource savings by avoiding
228 building Objective-C compiler is so small, the complexity added by NO_OBJC
229 internally was deemed a bad tradeoff so that is the reason for its removal.
230 Also note that no "info" pages are installed with GCC 5.  After this entry
231 was originally written, all info pages were removed from DragonFly.
232
233 GCC 5.1 has been designated as the primary compiler.  As such, there is a
234 new make.conf variable, NO_ALTCOMPILER.  It will block the rebuilding of
235 the designated secondary compiler, GCC 4.7.  However, while DPorts
236 primarily uses GCC 5 to build ports now, it still uses GCC 4.7 as well, so
237 if building ports from source is desired, don't block building of the
238 secondary compiler.
239
240 +-----------------------------------------------------------------------+
241 +         UPGRADING DRAGONFLY FROM 3.8 TO LATER VERSIONS                +
242 +-----------------------------------------------------------------------+
243
244 SMP AND DEVICE_POLLING OPTIONS MADE UNKNOWN
245 -------------------------------------------
246
247 DEVICE_POLLING was replaced by IFPOLL_ENABLE and the former SMP code is
248 the default now (even on single-core systems), both for, like, 21 months.
249 We kept the options around as no-ops as a convenience, to allow people
250 using the same config for the then current release and the then current
251 master. That period is now over, so any configs still having those
252 options have to be adjusted.
253
254 SYSVIPC SYSCALLS MADE NON-OPTIONAL
255 ----------------------------------
256
257 The code related to the SYSVMSG, SYSVSEM and SYSVSHM kernel options is
258 now compiled in by default. The options are no-ops for now.
259
260 DEFAULT DRIVER CHANGED FOR LSI "THUNDERBOLT" SERIES RAID CONTROLLERS
261 --------------------------------------------------------------------
262
263 The default driver for those controllers is now mrsas(4) due to reports
264 of file system corruption using the mfi(4) driver. The whole issue (and
265 how to deal with potential problems when switching) was explained here:
266
267 http://lists.dragonflybsd.org/pipermail/users/2014-July/128703.html
268
269 A tunable is provided for letting those controllers still attach via
270 the mfi(4) driver, hw.mrsas.mfi_enable (see mrsas(4) manual page).
271
272 OLDER NETWORK DRIVERS MOVED TO I386 ONLY
273 ----------------------------------------
274
275 The following drivers have been made i386 only: ed(4), sr(4), ng_sync_ar
276 and ng_sync_sr. ed(4) used to be in X86_64_GENERIC, so it has to be
277 removed in kernel configs derived from X86_64_GENERIC.
278
279 +-----------------------------------------------------------------------+
280 +         UPGRADING DRAGONFLY FROM 3.6 TO LATER VERSIONS                +
281 +-----------------------------------------------------------------------+
282
283 UPDATE FROM MOST RECENT 3.6
284 ---------------------------
285
286 Versions of 3.6 built before June 25th have a bug where installworld might 
287 crash during installation of the new initrd.  Upgrade to the latest version
288 of 3.6 before updating to 3.8 or later.
289
290 ATM, IPX, NCP AND NWFS SUPPORT DROPPED
291 --------------------------------------
292
293 Support for the IPX and NCP network protocols and for mouting NetWare
294 file systems has been dropped. Dito for ATM protocol support.
295
296 INITRD IMAGES NOW INSTALLED BY DEFAULT
297 --------------------------------------
298
299 An initial ramdisk image is now installed in /boot/kernel/initrd.img.gz
300
301 Older images installed under the file name of initrd.img will be removed
302 automatically by the make upgrade process.
303
304 USB4BSD IS NOW THE DEFAULT USB STACK
305 ------------------------------------
306
307 To get back to the old stack, put "WANT_OLDUSB=yes" in /etc/make.conf and
308 replace "device usb" with "device oldusb" in the kernel configuration.
309
310 MORE ISA SUPPORT DROPPED
311 ------------------------
312
313 ISA support has been dropped from the following drivers: adv(4), an(4),
314 ar(4), cs(4), digi(4), ed(4), ep(4), ex(4), fe(4), lnc(4), sbni(4),
315 si(4), sn(4), and stg(4).
316
317 +-----------------------------------------------------------------------+
318 +         UPGRADING DRAGONFLY FROM 3.4 TO LATER VERSIONS                +
319 +-----------------------------------------------------------------------+
320
321 ABI CHANGE
322 ----------
323
324 Installed third-party software (dports) will have to be rebuilt after upgrade,
325 or reinstalled from binary packages.
326
327 UPDATING FROM 3.4 TO 3.6
328 ------------------------
329
330 This only applies for this specific upgrade due to locale changes; it is 
331 not needed for upgrades after 3.6.  Please update in this order:
332
333 make buildworld
334 make buildkernel
335 make installworld
336 make installkernel
337 *reboot*
338 make upgrade
339
340 See this mailing list post for details:
341 http://lists.dragonflybsd.org/pipermail/users/2013-September/090163.html
342
343 CYRIX OPTIONS REMOVED
344 ---------------------
345
346 The following Cyrix related options have been removed: CPU_BTB_EN,
347 CPU_CYRIX_NO_LOCK, CPU_DIRECT_MAPPED_CACHE, CPU_DISABLE_5X86_LSSER,
348 CPU_FASTER_5X86_FPU, CPU_IORT, CPU_LOOP_EN, CPU_RSTK_EN, CPU_SUSP_HLT,
349 CYRIX_CACHE_WORKS, and CYRIX_CACHE_REALLY_WORKS
350
351 ISA SUPPORT REMOVED FROM RP(4)
352 ------------------------------
353
354 ISA support has been removed from the rp(4) driver. It is now PCI only.
355
356 +-----------------------------------------------------------------------+
357 +         UPGRADING DRAGONFLY FROM 3.2 TO LATER VERSIONS                +
358 +-----------------------------------------------------------------------+
359
360 COMPAT_SUNOS OPTION REMOVED
361 ---------------------------
362
363 The COMPAT_SUNOS option has been removed. It was meant to provide binary
364 compatibility with SunOS 4.x for the sparc32 port of 4.4BSD.
365
366 ISA SOUND CARD SUPPORT REMOVED
367 ------------------------------
368
369 The following modules have been removed (all for ISA sound cards):
370 snd_ad1816.ko, snd_ess.ko, snd_mss.ko, snd_sb8.ko, snd_sb16.ko, snd_sbc.ko
371
372 GCC 4.7
373 -------
374
375 DragonFly has switched base compilers.  GCC 4.7 is now the default
376 compiler and GCC 4.4 is the alternative compiler.  The "NO_GCC47" make
377 variable ceases to work now.
378
379 Users who wish to build only GCC 4.7 have to use NO_GCC44 in the
380 /etc/make.conf to prohibit GCC 4.4 from building.  However, using it is
381 highly discouraged.  There are a few packages in pkgsrc that do not build
382 with GCC 4.7 and the new "DPorts" system uses GCC 4.4 by default.  At
383 this time, it is recommended to keep both compilers on the base system.
384
385 SMP OPTION REMOVED
386 ------------------
387
388 The SMP kernel option has been made a no-op. All kernels now feature SMP
389 support. If you have 'options SMP' in your kernel config, you can as well
390 remove it.
391
392 DEVICE_POLLING OPTION REPLACED BY IFPOLL_ENABLE OPTION, KTR_POLLING REMOVED
393 ---------------------------------------------------------------------------
394
395 The DEVICE_POLLING kernel option has been made a no-op and it has been
396 replaced by IFPOLL_ENABLE.  If you have 'options DEVICE_POLLING' in your
397 kernel config, you need to change it to IFPOLL_ENABLE.
398
399 Also, the KTR_POLLING kernel option has been removed, so it must be
400 removed from kernel configs that have it.
401
402 BUSLOGIC, CYCLADES AND STALLION ISA SUPPORT REMOVED
403 ---------------------------------------------------
404
405 The bt(4) driver for Buslogic SCSI adapters has been made PCI only. ISA
406 cards will no longer be detected.
407
408 The same has been done for Stallion multiport serial controllers. stli(4)
409 has been completely removed (along with the stlload(8) and stlstty(8)
410 utilities) and stl(4) was changed to support only PCI cards. Similarly,
411 ISA support was removed from cy(4) too. All these drivers are i386 only.
412
413 COMPAT_OLDISA OPTION GONE
414 -------------------------
415
416 The i386 specific COMPAT_OLDISA kernel option has been removed, since
417 nothing needs it anymore.
418
419 +-----------------------------------------------------------------------+
420 +         UPGRADING DRAGONFLY FROM 3.0 TO LATER VERSIONS                +
421 +-----------------------------------------------------------------------+
422
423 APIC_IO OPTION REMOVED
424 ----------------------
425
426 The APIC_IO kernel option is no longer accepted after having been without
427 effect for a while. The hw.ioapic_enable tunable now serves its purpose.
428 If you have 'options APIC_IO' in your kernel config, you'll have to
429 remove it.
430
431 WATCHDOG_ENABLE & HW_WDOG OPTIONS REMOVED
432 -----------------------------------------
433
434 The wdog framework is now compiled into our kernels by default, so the
435 options are no longer needed.
436
437 DOSCMD(1) REMOVED
438 -----------------
439
440 doscmd(1) has been removed. It was i386 only. The doscmd(1) specific
441 NO_X make.conf option was removed too.
442
443 GCC 4.7
444 -------
445
446 GCC 4.7 has been brought in and replaces GCC 4.1 as DragonFly's non-
447 default compiler in base (default is still GCC 4.4).
448
449 Users who wish to build only GCC 4.4 have to replace NO_GCC41 with
450 NO_GCC47 in /etc/make.conf.
451
452 USB4BSD
453 -------
454
455 A new USB stack (from FreeBSD) has been brought in. The following
456 modules have been ported so far: usb, uhci, ohci, ehci, xhci, umass,
457 usfs, uether, if_axe, if_udav, ukbd, ums, uep, uhid, usb_quirk,
458 and uaudio.
459
460 It is not yet the default. To activate it, WANT_USB4BSD=yes has to
461 be put in make.conf and device "usb4bsd" (quotes needed) has to
462 replace device usb in the kernel config. After that, a full
463 build/install/upgrade cycle is needed.
464
465 Note that this is experimental and incomplete, but we are interested
466 in hearing about issues with it, of course.
467
468 ISA SUPPORT REMOVED FROM AIC-6260/6360 DRIVER
469 ---------------------------------------------
470
471 ISA adapter support was dropped from the aic(4) driver.
472
473 +-----------------------------------------------------------------------+
474 +         UPGRADING DRAGONFLY FROM 2.10 TO LATER VERSIONS               +
475 +-----------------------------------------------------------------------+
476
477 SEVERAL ISA DRIVERS REMOVED
478 ---------------------------
479
480 The following ISA only drivers have been removed along with a couple of
481 associated userland tools:
482
483 aha(4)
484 asc(4) & sasc(1)
485 ctx
486 dgb(4)
487 el(4)
488 gpib
489 gsc(4) & sgsc(1)
490 ie(4)
491 labpc(4)
492 le(4)
493 mse(4)
494 rc(4)
495 rdp(4)
496 spigot
497 tw(4) & xten(1) & xtend(8)
498 wl(4) & wlconfig(8)
499 wt(4)
500
501 Note that two of these drivers (aha(4) and ie(4)) are in our GENERIC
502 config and one (aha(4)) is in our X86_64_GENERIC kernel configuration
503 file.
504
505 If buildkernel complains about any of these drivers, just remove them
506 from your kernel configuration.
507
508 BINUTILS 2.20
509 -------------
510 Binutils 2.20 has been removed in favor of Binutils 2.22.  The accepted
511 values of BINUTILSVERS are now binutils221 and binutils222 (default).
512
513 BUILDWORLD/-KERNEL PARALLELIZATION WORK
514 ---------------------------------------
515 Due to changes in the way we build with more than one make job, you
516 will have to update install(1) and mkdir(1) prior to buildworld if you
517 want to build with 'make -j':
518
519 cd /usr/src/usr.bin/xinstall; make; make install; make clean
520 cd /usr/src/bin/mkdir; make; make install; make clean
521
522 DMA(8) UPGRADE
523 --------------
524 dma(8) has been upgraded to v0.7 which no longer supports the
525 /etc/dma/virtusertable. Some of its functionality has been replaced
526 with the MASQUERADE keyword and the EMAIL environment variable (see
527 the dma(8) manual page).
528
529 +-----------------------------------------------------------------------+
530 +         UPGRADING DRAGONFLY FROM 2.8 TO LATER VERSIONS                +
531 +-----------------------------------------------------------------------+
532
533 GCC 4.4 & BINUTILS 2.21
534 -----------------------
535
536 GCC 4.4 has been made DragonFly's default compiler and Binutils 2.21 has
537 been made DragonFly's default Binutils.
538
539 That means that any settings that set CCVER to 'gcc44' are not needed
540 anymore. Instead, CCVER can be set to 'gcc41' to go back to using
541 GCC 4.1.
542
543 It also means that 'binutils221' as a value for BINUTILSVER has no
544 effect anymore. 2.17 has been removed and 'binutils220' is available
545 as an option.
546
547 The NO_GCC44 option has been removed and will not affect the build
548 anymore. There is now a NO_GCC41 option that will prevent GCC 4.1 from
549 building in a similar fashion.
550
551 Note that you must do a full buildworld/buildkernel for upgrading.
552
553 pkg_radd settings
554 -----------------
555
556 The config file for pkg_radd has moved from /etc/settings.conf to 
557 /etc/pkg_radd.conf.  Save the contents of settings.conf before upgrading
558 if this is needed.  This warning only applies if /etc/settings.conf 
559 exists.  pkg_radd will continue to work with defaults.
560
561 +-----------------------------------------------------------------------+
562 +         20100927                                                      +
563 +         UPGRADING DRAGONFLY FROM 2.6 to 2.8 or HEAD                   +
564 +-----------------------------------------------------------------------+
565
566 OpenSSL
567 --------
568
569 OpenSSL has been upgraded, and SHLIB_MAJOR was bumped for libssh and libcrypto.
570 This shouldn't break any 3rd-party software, but you'll need to recompile your
571 3rd-party software if you want it to link against the new version of OpenSSL.
572
573 Loader
574 -------
575
576 A new loader (dloader) has been added which better handles booting from
577 multiple kernel/module versions.
578
579 To upgrade (Only for this upgrade, for post 2.8 upgrades see GENERAL below)
580
581         cd /usr/src
582         make buildworld
583         make installworld
584         make upgrade
585         make buildkernel KERNCONF=<KERNELNAME>
586         make installkernel KERNCONF=<KERNELNAME>
587
588 Note that you must installworld and run the 'upgrade' target before
589 installing the new kernel.
590
591 BIND
592 -----
593
594 BIND has been removed from the base system.  The ldns and drill tools have 
595 been added for basic functionality.  Use 'drill' where you would normally 
596 use nslookup or dig, or install BIND from pkgsrc.  It's available as 
597 net/bind95, net/bind96, or net/bind97 as of this writing.
598
599 This only affects older systems upgrading to 2.8.  New 2.8+ installs 
600 include BIND as a pkgsrc package.
601
602 +-----------------------------------------------------------------------+
603 +         UPGRADING DRAGONFLY ON AN EXISTING DRAGONFLY SYSTEM           +
604 +                               GENERAL                                 +
605 +-----------------------------------------------------------------------+
606
607 Instructions on how to obtain and maintain DragonFly source code using git
608 are in the development(7) manual page.
609
610 To upgrade a DragonFly system from sources you run the following sequence:
611
612         cd /usr/src
613         make buildworld
614         make buildkernel KERNCONF=<KERNELNAME>
615         make installkernel KERNCONF=<KERNELNAME>
616         make installworld
617
618 You will also want to run the 'upgrade' target to upgrade your /etc and the
619 rest of your system.  The upgrade target is aware of stale files created by
620 older DragonFly installations and should delete them automatically.
621
622         make upgrade
623
624 See the build(7) manual page for further information.
625
626 Once you've done a full build of the world and kernel you can do incremental
627 upgrades of either by using the 'quickworld' and 'quickkernel' targets
628 instead of 'buildworld' and 'buildkernel'.  If you have any problems with
629 the quick targets, try updating your repo first, and then a full buildworld
630 and buildkernel as shown above, before asking for help.
631
632 +-----------------------------------------------------------------------+
633 +         UPGRADING FROM DRAGONFLY <= 2.0 TO DRAGONFLY >= 2.1           +
634 +-----------------------------------------------------------------------+
635
636 In 2.1 kernel and modules has moved to boot directory.  For most cases
637 this is handled automatically by 'make upgrade'.  A few cases needs manual
638 intervention:
639
640  * When installing a kernel without first doing a make buildworld,
641    installworld and upgrade to the same DESTDIR as kernel:
642    make DESTDIR/boot directory and move kernel and modules into this boot
643    directory; also move kernel.old and modules.old.
644    Typical example is vkernel(7), use (no modules used):
645
646         cd /var/vkernel
647         mkdir boot
648         chflags noschg kernel
649         mv kernel kernel.old boot
650         chflags schg boot/kernel
651         
652  * When using a boot-only partition, /boot/loader.rc needs to be edited:
653    delete occurrences of '/boot/'.
654    These occurences can normally be deleted in any case, see loader(8).
655
656 +-----------------------------------------------------------------------+
657 +         UPGRADING FROM DRAGONFLY <= 1.8 TO DRAGONFLY >= 1.9           +
658 +-----------------------------------------------------------------------+
659
660 In 1.9 major changes to the disk management infrastructure have taken
661 place.  make upgrade may not catch all of your disk devices in /dev,
662 so after upgrading be sure to cd /dev; ./MAKEDEV <blah> where <blah>
663 are all of your disk devices.  HOWEVER, from late 2.3 on we run devfs
664 and MAKEDEV no longer exists.
665
666 The biggest changes in 1.9 are:
667
668 (1) That whole-slice devices such as da0s1 no longer share the same device
669     id as partition c devices such as da0s1c.
670
671 (2) The whole-disk device (e.g. da0) is full raw access to the disk,
672     with no snooping or reserved sectors.  Consequently you cannot run
673     disklabel on this device.  Instead you must run disklabel on a
674     whole-slice device.
675
676 (3) The 'compatibility' partitions now use slice 0 in the device name,
677     so instead of da0a you must specify da0s0a.  Also, as per (1) above,
678     accessing the disklabel for the compatibility partitions must be
679     done via slice 0 (da0s0).
680
681 (4) Many device drivers that used to fake up labels, such as CD, ACD, VN,
682     and CCD now run through the disk management layer and are assigned
683     real disk management devices.   VN and CCD in particular do not usually
684     use a MBR and disklabels must be accessed through the compatibility
685     slice 0.  Your /etc/ccd.conf file still specifies 'ccd0', though, you
686     don't name it 'ccd0s0' in the config file.
687
688 Generally speaking, you have to get used to running fdisk and disklabel on
689 the correctly specified device names.  A lot of the wiggle, such as running
690 disklabel on a partition, has been removed.
691
692 +-----------------------------------------------------------------------+
693 +         UPGRADING FROM OLDER VERSIONS OF DRAGONFLY OR FREEBSD         +
694 +-----------------------------------------------------------------------+
695
696 > Kerberos IV
697 -------------
698
699 Kerberos IV (eBones) was removed from the tree, please consider moving to
700 Kerberos 5 (Heimdal).
701
702 > Package Management System
703 ---------------------------
704
705 Starting with the 1.4 release, DragonFly uses NetBSD's pkgsrc package
706 management system.  The necessary tools to build and maintain packages
707 are provided in /usr/pkg/bin and /usr/pkg/sbin.  Make sure that these
708 directories are in your PATH variable.
709
710 In order to obtain a reasonably current snapshot of the pkgsrc tree, use
711 the tarball from NetBSD:
712
713         fetch -o /tmp/pkgsrc.tar.gz ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc.tar.gz
714         cd /usr; tar -xzf /tmp/pkgsrc.tar.gz; chown -R root:wheel pkgsrc
715
716 This tree can then be kept up to date with cvs update:
717
718         cd /usr/pkgsrc; cvs up
719
720 NOTE! If you upgraded from a pre-1.4 system to 1.4 or later, you need to
721 build and install the pkgsrc bootstrap manually:
722
723         cd /usr/pkgsrc/bootstrap
724         ./bootstrap --pkgdbdir /var/db/pkg --prefix /usr/pkg
725
726 +-----------------------------------------------------------------------+
727 +         UPGRADING DRAGONFLY ON AN EXISTING DRAGONFLY SYSTEM           +
728 +         UPDATING FROM PRE-1.2 SYSTEMS OR FreeBSD 4.x TO               +
729 +         DRAGONFLY 1.3+ (EITHER PREVIEW or HEAD)                       +
730 +-----------------------------------------------------------------------+
731
732 The compatibility shims for the build environment have been removed, you
733 have to update to DragonFly 1.2 release branch first.
734
735 The default PAM configuration has moved from /etc/pam.conf to /etc/pam.d/.
736 The existing configuration can be converted using /etc/pam.d/convert.sh.
737 Entries in /etc/pam.d/ override entries in /etc/pam.conf. In addition
738 the pam_skey.so module was retired, you have to remove it manually from
739 your configuration, when you convert it.
740
741 > Required user and group IDs when upgrading from either FreeBSD or DragonFly
742 ---------------------
743
744 The following users may be missing from your password file.  Use vipw and
745 add any that are missing:
746
747 smmsp:*:25:25::0:0:Sendmail Submission User:/var/spool/clientmqueue:/sbin/nologin
748 _pflogd:*:64:64::0:0:pflogd privsep user:/var/empty:/sbin/nologin
749
750 The following groups may be missing from your group file.  Use vi /etc/group
751 and add any that are missing:
752
753 smmsp:*:25:
754 authpf:*:63:
755 _pflogd:*:64:
756
757
758 > Upgrading to DragonFly from FreeBSD
759 ---------------------
760
761 You can build the DragonFly world and DragonFly kernels on a FreeBSD-4.x or
762 FreeBSD-5.x machine and then install DragonFly over FreeBSD, replacing
763 FreeBSD.  Note that the DragonFly buildworld target does not try to reuse
764 make depend information, it starts from scratch, so no pre-cleaning of the
765 object hierarchy is necessary.
766
767         # get the CVS repository (it is placed in /home/dcvs, 500MB).
768         # Please use the -h option and a mirror site to pull the 
769         # initial repository, but feel free to use the main repository
770         # machine to pull updates.
771         cvsup /usr/share/examples/cvsup/DragonFly-cvs-supfile
772         # install the source from the CVS hierarchy (remove preexisting
773         # FreeBSD src first) (500MB)
774         cd /usr
775         rm -rf src
776         cvs -R -d /home/dcvs checkout -P src
777
778         # build it (500MB used in /usr/obj)
779         #
780         cd /usr/src
781         make buildworld
782         make buildkernel KERNCONF=<KERNELNAME>
783
784 Once you have built DragonFly you have to install it over FreeBSD.  Since
785 DragonFly does not track changes made by FreeBSD to its include file 
786 hierarchy and include file pollution can cause all sorts of unexpected
787 compilation issues to come up, it is best to wipe your include hierarchy
788 prior to installing DragonFly.  Note that you should not wipe any installed
789 FreeBSD header files or binaries until after you have successfully completed
790 the build steps above.
791
792         rm -rf /usr/include
793         mkdir /usr/include
794         make installkernel KERNCONF=<KERNELNAME>
795         make installworld
796
797 Then you need to upgrade your system.  DragonFly's 'make upgrade' target 
798 will unconditionally upgrade the /etc files that sysops do not usually
799 mess around with, such as the files in /etc/rc.d.  It will also remove any
800 obsolete files such as utilities and manpages that have been removed from
801 the system since the version you're coming from.  If you are unsure we 
802 recommend that you make a backup of at least your /etc before applying
803 this step.  Note that DragonFly's RC system is basically RCNG from
804 FreeBSD-5, but there are some differences in the contents of the RC files.
805
806         make upgrade
807
808 NOTE! Never do a 'make upgrade' before 'make installworld' has been run.
809 Doing so might leave your system in an unusable state.
810
811 Finally we recommend that you do an 'ls -lta BLAH' for /bin, /sbin, /usr/bin,
812 /usr/bin, and /usr/lib, and remove any stale files that you find.  Please
813 report these files to the DragonFly developers so that they can be added to
814 the 'upgrade' target.
815