# etcupdate diff?



## jb_fvwm2 (Apr 20, 2021)

Having used the soon-deprecated  `mergemaster -piPcv` reliably over decades,  I am a little concerned about my ignorance about knowing of the
drop-in replacement using `etcupdate` without risk of being locked
out upon a reboot, when upgrading, say,  from v12 to v13.  I have the info from `etcupdate diff` and am wondering ...

1...  Does `etcupdate` provide an equivalent to that `mergemaster` command, also,
2...  if one preserves a legacy copy of mergemaster, could it be used in place of etcupdate from
thence onward, and further
3...  will/would /usr/src/UPDATING have a foolproof usage of `etcupdate` with its parameters before a source or `freebsd-update....upgrade` command


----------



## zirias@ (Apr 20, 2021)

The Handbook has been updated to use etcupdate(8), see for example here:








						Chapter 25. Updating and Upgrading FreeBSD
					

Information about how to keep a FreeBSD system up-to-date with freebsd-update or Git, how to rebuild and reinstall the entire base system, etc




					docs.freebsd.org
				



If you never used it before and already installed from source, you must bootstrap it once before the next upgrade with the `extract` subcommand.
You should NOT continue using mergemaster(8). It identifies changed files using the source control tags (`$FreeBSD ...`) which are _gone_ now, so it will malfunction. (One upgrade from 12 to 13 will work fine, because those tags no longer being set _is_ a difference, but after that, mergemaster will be broken)
See also:








						Heads-Up: Deprecation of mergemaster
					

So far, I was using mergemaster when upgrading from source; it worked fine, and it's also described in the handbook.  Now I learned it's deprecated and will be removed soon. It might be dangerous after 13.0-RELEASE, because it relies on SVN source tags that don't exist any more with git!  For...




					forums.freebsd.org


----------



## mickey (Apr 20, 2021)

jb_fvwm2 said:


> 3... will/would /usr/src/UPDATING have a foolproof usage of `etcupdate` with its parameters before a source or `freebsd-update....upgrade` command


Unfortunately as of now neither the instructions in /usr/src/UPDATING nor /usr/src/Makefile have been updated to use etcupdate(8) instead of mergemaster(8). Since 12.2-RELEASE-p5 I followed the updated instruction in the handbook after having bootstrapped etcupdate(8) and did not experience any problems. Takes some getting used to and reading the man pages, but in the end I believe it does a better job than mergemaster(8). Most changes could be merged automatically and you can use `etcupdate status` to check for and `etcupdate resolve` to resolve any remaining conflicts manually. I'm so glad this also puts and end to having to manually confirm lots of files where only the FreeBSD ID changed.


----------



## Yze (Apr 20, 2021)

etcupdate works like a breeze. It "triangles" the changes by comparing the original with the new sources in comparison to the current system (thats why you need to start with etcpudate extract the first time).

In case you forgot to "etcupdate extract" before and have a similar previous version running somewhere else, you can use "etcupdate build" to create an extractable tarball to bootstrap your "forgotton" hosts.


----------



## driesm (Apr 20, 2021)

I'm trying to streamline the notes in /usr/src/UPDATING with the handbook, the handbook portion landed first.
Here's the review, I still have some little things to change but should land soon https://reviews.freebsd.org/D28062.


----------



## SirDice (Apr 20, 2021)

mickey said:


> I'm so glad this also puts and end to having to manually confirm lots of files where only the FreeBSD ID changed.


A bit moot now but mergemaster(8) has a `-F` option:

```
-F          If the files differ only by VCS Id ($FreeBSD) install the new
                 file.
```
But as I said, it's moot now, those VCS ids are all empty since the transition to git. After more than 2 decades of using mergemaster(8) I too have switched to etcupdate(8).


----------

