Removing fdisk and bsdlabel (legacy partition tools)

From: Ed Maste <emaste_at_freebsd.org>
Date: Wed, 24 Jan 2024 15:44:57 UTC
MBR (PC BIOS) partition tables were historically maintained with
fdisk(8), but gpart(8) has long been the preferred method for working
with partition tables of all types. fdisk has been declared as
obsolete in the man page since 2015. Similarly BSD disklabels were
historically maintained with bsdlabel. It does not yet have a
deprecation notice - I have proposed a man page addition in
https://reviews.freebsd.org/D43563.

I would like to disconnect these from the build, and subsequently
remove them. This is prompted by a recent bsdlabel bug report which
uncovered a longstanding buffer overflow in that tool. Effort is much
better focused on contemporary, maintained tools rather than
investigating issues in deprecated ones. Removing these tools would
happen in FreeBSD 15 only (no change in 14 or 13).

Code review to disconnect fdisk: https://reviews.freebsd.org/D43575

Note that this effort is limited to these maintenance tools only -
there is no change to kernel or gpart support for MBR or BSD
disklablel partitioning. That said, MBR partitioning and BSD
disklabels are best considered legacy formats and should be avoided
for new installations, if possible.

If anyone is using fdisk and/or bsdlabel rather than gpart I would
appreciate knowing what is preventing you from using the contemporary
tools.