OpenBSD manual page server

Manual Page Search Parameters

SYSMERGE(8) System Manager's Manual SYSMERGE(8)

sysmergeupdate system configuration files

sysmerge [-bdS] [-s [src | etcXX.tgz]] [-x xetcXX.tgz]

sysmerge is a ksh(1) script designed to help the administrator update configuration files after upgrading to a new release or snapshot. The configuration files are typically those held in /etc, though sysmerge is also able to update files held in /dev, /root, and /var.

sysmerge works by comparing a temporary reference root directory against currently installed files. The reference files are created from a cvs(1) source tree or a “.tgz” release or snapshot file. All work is done under ${TMPDIR}/sysmerge.XXXXXXXXXX (known as the ). The temporary root directory temproot is created under the work directory. Each modified and/or replaced file is saved under the backup directory inside the work directory.

If no source is specified on the command line, sysmerge uses ftp(1) to fetch the required sets from the URL pointed to by the SM_PATH environment variable, and falls back to /usr/src if this variable is unset.

To make sure configuration files are in sync with the actual binaries, use the same source as was used to upgrade the system: /usr/src when upgrading from source; etcXX.tgz and xetcXX.tgz when upgrading from tgz sets. When using sets, sysmerge will cryptographically verify their integrity, stopping immediately should signatures not match.

sysmerge will work through the fileset, offering the chance to merge any differences using ${MERGE_CMD}. Merged files may be edited using a default editor, or one defined by the ${VISUAL} or ${EDITOR} environment variables. Files may also be left to deal with at a later date. Should any problems occur, such as a failure to upgrade a file, the user will be notified and have to deal with the issue by hand.

By default (if -d is not used) sysmerge only compares files whose reference sources have changed since the last run and attempts to automatically upgrade them to the newest version, provided that they have no local changes. It automatically installs missing files and binaries, and updates files differing only by CVS Id. Files whose reference sources have matching CVS Id are skipped from comparison. /etc/fbtab, /etc/sysctl.conf, and /etc/ttys are created using helper scripts and are always compared. Users and groups that are missing from the current installation but present in the new master.passwd(5) and group(5) files will always be automatically (re)created.

Each time sysmerge is run it will compare the checksum of each file stored under /etc/examples against the previous one, then warn if it does not match and the corresponding file exists under /etc.

sysmerge will finish by running mtree(8) to make sure the directory structure has correct permissions.

The options are as follows:

Batch mode. sysmerge runs non-interactively, saving differing files for later manual processing.
Diff mode. In this mode, sysmerge will not take any automatic action, allowing for a full diff comparison.
Do not verify signatures for tgz sets.
[src | etcXX.tgz]
Specify a path to an OpenBSD top src directory or an etcXX.tgz tarball. A tarball path specified as a URL will be passed to ftp(1).
xetcXX.tgz
Specify a path to an xetcXX.tgz tarball. A tarball path specified as a URL will be passed to ftp(1).

Files and directories can be excluded from comparison by listing them in the file /etc/sysmerge.ignore, each entry separated by white space or a new line. The following files will always be skipped from comparison: /etc/*.db, /etc/localtime, /etc/mail/*.db, /etc/passwd, /etc/motd, /etc/myname, /var/db/locate.database, /usr/share/sysmerge/etcsum, /usr/share/sysmerge/examplessum, /usr/share/sysmerge/xetcsum, /var/mail/root.

The sendmail(8) configuration files /etc/mail/localhost.cf, /etc/mail/sendmail.cf and /etc/mail/submit.cf will always differ because they include their build date and directories. A special test was added to handle this and they are offered for comparison only if they really differ.

Directory in which checksum files are stored. If unset, this defaults to /usr/share/sysmerge.
Directory in which to merge and install files. If unset, this defaults to /.
, VISUAL
Specifies an editor to use. If both EDITOR and VISUAL are set, VISUAL takes precedence. If neither EDITOR nor VISUAL are set, the default is vi(1).
Have ftp(1) send a byte after every FTP_KEEPALIVE seconds, so that incorrectly configured network equipment won't aggressively drop it. See “ftp -k” for more information.
Command used to merge diffs. This will be called with three arguments: the first argument is the output file to create, the second argument is the currently installed file and the third argument is the reference file. If unset, this defaults to “sdiff -as -w ${SWIDTH} -o”.
Specifies the pagination program to use.
Log summary which may contain information for further, manual, updating. Defaults to ${WRKDIR}/sysmerge.log.
A URL, specifying the directory to search for sets matching the currently running release if none are specified on the command line.
Directory in which the work directory is created. If unset, this defaults to /var/tmp.

${TMPDIR}/sysmerge.XXXXXXXXXX
Default work directory. The and directories are created relative to this.
${WRKDIR}/sysmerge.log
Default log file.
/etc/sysmerge.ignore
Files and directories to ignore from comparison.

more(1), sdiff(1)

/usr/src/etc/Makefile

http://www.openbsd.org/faq/current.html http://www.openbsd.org/faq/upgradeXX.html

The sysmerge script first appeared in OpenBSD 4.4.

The sysmerge shell script was written by Antoine Jacoutot <ajacoutot@openbsd.org> using FreeBSD mergemaster written by Douglas Barton <DougB@FreeBSD.org> as a base.

July 15, 2014 OpenBSD-5.6