OpenBSD Journal

FreeBSD Diary: Mergemaster

Contributed by jose on from the upgrade-help dept.

The FreeBSD Diary site some time ago ran a piece on the use of mergemaster . This tool, available in the OpenBSD ports tree, is useful for upgrading configuration files on your host which are outside of the normal upgrade areas. These include the /etc tree. The use of mergemaster is quite similar, if not the same, between the two systems.

While the FreeBSD diary page does nothing substantial to help you get started, the use of mergemaster is quite simple. Basic use of the tool will first create /var/tmp/temproot (by default) and populate a fake directory structure. then it will start to compare various flat text files between the directory structure there and your real system, such as /dev/MAKEDEV, /etc/rc, and the like. You can view the diffs in chunks and act on each chunk by chosing the new (temporary) file, keeping the old one, or merging the two. When you merge you have to handle the patch chunk by chunk with a left and a right hand side. For some files this can be very long, but for others its worth the time. There are some files that you shouldn't merge without careful thought, like /etc/sudoers and the password file. Mergemaster has a lot of configuration options available via its .mergemasterrc file. This way is significantly easier than doing the procedure by hand, plus helps you keep backups.

(Comments are closed)

  1. By Gimlet () on

    I've run FreeBSD on my workstation at work for the last few years, and I find it to be a very useful tool when upgrading. Naturally, it still requires you to know what you're doing, but it does automate the "what the $#@% changed in /etc" process and make things go more quickly.

    I haven't had much of a chance to use it in OpenBSD, but I'm sure I will in the future. If anyone out there is curious, I recommend trying it at least once.

    1. By Jeffrey () on

      I agree.
      I always use it on OpenBSD.
      It can help save lots of time.

  2. By Anonymous Coward () on

    Can I use it to upgrade windows 98 to Xwindows?

    1. By Anonymous Coward () on


    2. By Kenny Gryp () on

      yes, you can.
      just read the manual and find out!

    3. By Anonymous Coward () on

      Of course!

      format c: /autotest/q/u

Latest Articles


Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]