bootstrap: Add workaround for chflagsat() from 4.0.
commit9053551a387b4036a67dbca09e5ca53d74d6f253
authorzrj <rimvydas.jasinskas@gmail.com>
Fri, 21 Oct 2016 10:35:12 +0000 (21 13:35 +0300)
committerzrj <zrj@dragonflybsd.org>
Fri, 21 Oct 2016 13:32:13 +0000 (21 16:32 +0300)
tree551ac49155f01c0383833c1877e280e412a15a21
parenta01638790765d6109596e8d7238be1d6df618c41
bootstrap: Add workaround for chflagsat() from 4.0.

Avoid failing syscalls during installworld while updating from DragonFly 4.0.
Add special private version of chflagsat() to aid while performing migration.
Add triple protection for this private implementation variant.
Hopefully chflags-compat.h would never need any newer additions.

Since there are other issues that require both installkernel and installworld,
standard installkernel, reboot and installworld is not possible while updating
to recent DragonFly releases. chflags(1) must be handled with care.

Tested-on: kern.osreldate == 400000 updating straight to master (4.7).
  installworld step fail only on single non fatal chflags: invalid flag: xlink
  For make upgrade to work sendmail must be removed from /etc/mail/mailer.conf
  reboot(8) must be used cause shutdown is only functional only on new kernel.

Submitted-by: dillon@
usr.bin/chflags/Makefile
usr.bin/chflags/chflags-compat.h [new file with mode: 0644]