Fix lack of buildworld and quickworld messages The "world" target has a nice start/stop message. However, if somebody chooses to use "make buildworld" followed by "make installworld" rather than "make world", they get no messages at all. I think this has been an ongoing oversight. This commit improves the "world" target messages (e.g. all targets are ELF so don't need to specify that, and pre/post-world targets are shown.) More importantly it adds start/complete messages to buildworld, and start message to installworld. The installworld already had a complete message, but this was redone to match the format of the other ones. Similar messages were added to quickworld and realquickworld targets too.
build - add installworld-force target and better checks * Add better checks to installworld. Print an error and exit if the base system is too old, directing users to run installworld-force. * Add installworld-force. This automates installing the world on a base system which is too old and thus has chicken-and-egg problems with binaries and libraries. This install target will install to a temporary directory, compile up a static cpdup, and then use it to just blast copy /bin, /sbin, /lib, /libexec, /usr/bin, /usr/sbin, /usr/lib, and /usr/libexec. It will then execute a normal make installworld and make upgrade.
build - separate out the rescue initrd * Multiple issues with users crashing at the end of an installworld because initrd kldloads an out-of-date vn device. * Not a good idea to update the rescue image during an installworld anyway. * Make it a manual target called 'rescue' and remind the user at the end of the installworld that the target is available, but suggest rebooting first.
Makefile.inc: Rework automatic backup (bug 2527) There were three main problems with the recently added backup feature: 1. It didn't work over NFS 2. It didn't work when a non-root built world the second time 3. It didn't use DESTDIR which had potential to conflict backups It also previously featured "NO_BACKUP" which turned off the automatic backup feature. To fix the #2 problem, the install timestamp has been removed, so to avoid unwanted backups for multiple installworlds after one buildworld, the user needs to pass NO_BACKUP in the command line. This patch was contributed by Thomas Nikolajsen with minor modifications added by John Marino. http://bugs.dragonflybsd.org/issues/2527
build: implement automatic world backups The directives DAYS_BACKUP and NO_BACKUP have been removed. The "backupworld" target will save important directories to the WORLD_BACKUP directory just as before, and it is restored with the "restoreworld" target. Additionally, every time the "installworld" target is executed, the same directories will be automatically backed up at the location of ${MAKEOBJDIRPREFIX}/world_backup . These directories could be restored with the new make target "restoreworld-auto". The WORLD_BACKUP location default is now /var/backups/world_backup . The directory /usr/lib has been added to the backup list. The more useless errors seen with a broken world have been removed, these came in with bmake.
build: add "make backupworld" and "make restoreworld" functionality Three new make.conf parameters have been defined: * WORLD_BACKUP - location to store backed up world binaries default = /var/backups/world_binaries * DAYS_BACKUP - The number of days since the last backup that must pass before "make installworld" fails with an error default = 28 * NO_BACKUP - defining this will prevent backup checks. The build functionality has been changed. Prior to "make installworld", the makefile will check to see if system binaries have been previously backed up. If they haven't, "make installworld" will fail to execute explaining that the system should be backed up. If a previous backup does exist, but it's older than the specified number of days, "make installworld" will fail explaining the backup needs to be refreshed. Passing NO_BACKUP through the command line or make.conf will inhibit these checks. While here, define WORLD_CCVER, LDVER, WORLD_LDVER, WORLD_BINUTILSVER in make.conf man page too.
Replace legacy make with bmake The proper way to detect which make is building the makefile is to check for .PARSEDIR. If present, bmake is processing the makefile. For the time being, both make will be supported for bootstrapping purposes, but in time the check can be removed, say for the DragonFly 3.6 release. The abundance of .ORDER commands in bsd.dep.mk caused a breakage when building world in parallel with bmake. Likely some order constraints were impossible to achieve, and bmake just stopped while legacy did the best it could. In any case, the majority of the .ORDER commands were replaced by a single .ORDER command which solved the problem. The legacy make is disconnected in this commit set, but the source files will be removed soon.
Run makewhatis(8) after 'make upgrade' instead of after 'make installworld'. 'make upgrade' does (among other things) remove obsolete manual pages. If makewhatis(8) is run after 'make installworld' (i.e. before upgrade), the whatis database will still contain them. Therefore, run makewhatis(8) after 'make upgrade' when the removals are done. Pointed-out-by: tuxillo While here, clean up the upgrade target in /usr/src/Makefile a little bit.
Revert "rename amd64 architecture to x86_64" This reverts commit c1543a890188d397acca9fe7f76bcd982481a763. I'm reverting it because: 1) the change didn't get properly discussed 2) it was based on false premises: "The rest of the world seems to call amd64 x86_64." 3) no pkgsrc bulk build was done to test the change 4) the original committer acted irresponsibly by committing such a big change just before going on vacation.