Contributed by merdely on from the one-less-package-to-install dept.
Back in the OpenBSD 3.0 days, Christian Weisgerber (naddy@) imported sysutils/mergemaster into the ports tree. This tool is very useful for updating /etc after upgrading OpenBSD (see previous story). Bringing mergemaster, or something like it, into the base system had been up for discussion for a while. Recently, Antoine Jacoutot (ajacoutot@) took the initiative to create a new script, sysmerge(8), starting from mergemaster and ending up with something specific to OpenBSD.
Like mergemaster, sysmerge will build the new /etc (and /var & /root) files for comparison from an OpenBSD source tree. A new feature in sysmerge, though, is the ability to use an etcXY.tgz tarball directly. Using the command:
sysmerge will silently compare your /etc to what is in etc43.tgz until it reaches differences. Then, like mergemaster, sysmerge will prompt you to (d)elete the new file (keeping the old one), (i)nstall the new file or (m)erge the files using sdiff(1). The -a switch tells sysmerge to run in "automatic mode", automatically installing missing files, creating databases and devices and disabling strict file comparison using CVS Ids when possible. The -s ... switch tells sysmerge where to find the etc files for the update. Either a top-level source directory or an etcXY.tgz tarball file can be specified. /usr/src is used by default.sysmerge -a -s /path/to/`arch -ks`/etc43.tgz
In automatic mode, once sysmerge is done comparing files, databases are rebuilt if their files have changed (like pwd.db, spwd.db, aliases.db, ...), new devices are created if a new MAKEDEV script is installed and directory permissions are verified. If -a was not specified, you are prompted to do these things.
This is a work in progress. Please test it out and provide feedback. Planned features include xetcXY.tgz support, possibly a non-interactive mode and a way to add files and directories to ignore during the comparison.
Thank you, Antoine, for working on sysmerge.
(Comments are closed)