Tool-BarfreeBSD ArticlesSearch Our SiteHOMEfreeBSD LinksContribute to FreeBSD HelpFreeBSD FilesFreeBSD Script Corner

CVSUP / Mergemaster with FreeBSD

Want to keep your FreeBSD up to date ? Well here is a good way to keep up with the newest updates to FreeBSD.

 I have broke this process into to CVSUP process, one being the FreeBSD its self, the other being the ports section. This way, you can update your ports at anytime that you need to without rebooting. Follow the below steps and you should have no problems in updating your machine to the newest stable version of FreeBSD.

  NOTE: Download the files you need for this, the stable-supfile, and the ports-supfile from the "Files" area on this site. Look to the Left and you will see the button to click.
 Also, Make sure you are "ROOT" before you do this...

Users that are using FreeBSD 4.x or newer, you can use the following.

Step #1
To make your life much easier, I recommend that you goto the make.conf file, and modify the following. If you dont see this within your make.conf located in the /etc directory. Then add the following :
    PORTSSUPFILE=  /usr/share/examples/cvsup/ports-supfile
    SUP_UPDATE=   yes

For me is much faster for me, however, feel free to make the requested changes for yourself to which ever CVSUp server works best for you and your connection.

Then once you have modified the make.conf file, and you are ready to do your CVSUP, you only need to do the following.

Step #2
When you are in the directory :  /usr/ports

Step #3
Type: make update

Step #4
 Now that all the files brought in by the CVSUP are done, we now need to recompile the kernel. NOTE: Make sure to use the GENERIC kernel as your base, and make it your newest kernel. For example, if you had your original kernel called SR-71 as mine is, you need to do the following steps to assure you are using the newest kernel style.

             cd /sys/i386/conf
             cp SR-71 SR-71.old
             rm SR-71
             cp GENERIC SR-71

 What we have done here, is make a copy of the old kernel called SR-71, and called it SR-71.old so incase we need to go back and see what we had shown in the kernel before the CVSUP. Then we took the new kernel that we brought in by the CVSUP called GENERIC, and copied it to the name we are going to use called SR-71. Then once you have done this its time to make a new Kernel.

Step #5
Kernel Config :

 Use the following command :
        cd /usr/src ; make kernel KERNCONF=SR-71

Mergmaster Man Pages :
mergemaster is a Bourne shell script which is designed to aid you in updating the various configuration and other files associated with FreeBSD.  It is HIGHLY recommended that you back up your /etc directory before beginning this process.

Please review all of the MAN pages on Mergemaster before you use it. This is very HIGHLY recommended. Otherwise you could have many problems on your hands.

Once you are ready to fire mergemaster for the first time do the following :
    /usr/local/sbin/mergemaster -svd -w120

You should then follow all instructions as prompted by Mergemaster.

Advanced Script for Mergemaster :
 If you run FreeBSD, you probably know about mergemaster, the tool that lets you make sure your /etc is in shape after a cvs update. If you're like me you get tired of manually telling mergemaster to keep passwd, group, etc.

In /root/bin/
# NOTE: No PATH needed, because mm’s PATH is already draconian enough

# I want mm to always ignore these files
for i in motd passwd group master.passwd syslog.conf newsyslog.conf \
    hosts.allow mail.rc shells namedb/named.conf login.conf printcap \
    hosts mail/aliases inetd.conf sysctl.conf
    rm -f ${TEMPROOT-failsafe}/etc/${i}

# I don’t use inetd, so always just update this file
# rm -f /etc/inetd.conf

# NOTE: No exit here, or else mm will exit too

Then in /etc/mergemaster.rc, put:
Now you will have a much easier time with mergemaster!

  by: GhostRdr / Habeeb

© 1997 - 20013 Defcon1, , Copyrights for all materials on this web site are held by the individual authors, artists, photographers or creators. Materials may not be reproduced or otherwise distributed without permission of and the content's original author.

Tool-Bar-2Defcon1  Webmail