Defcon-1-Logo

           [Home]    [FBSD Articles]    [Scripts Corner]    [Contribute]    [Search]    [FBSD Links]    [Files]

About Us

FreeBSD Articles
  *Hardware
  *Networking
  *Security
  *Software
  *X Windows


Files / Scripts
Newbies Corner
Tech. Talk
Tips and Tricks


FreeBSD Links

Articles in other
Languages :
  *French Articles
  *Spanish Articles

Want to Help ?
 
   Click Here

Email Users5

Search:
 

 


FreeBSD Search:


 

 

Powered-By-Apache-Logo

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
    SUPHOST=    cvsup6.freebsd.org
    SUP_UPDATE=   yes

For me cvsup6.freebsd.org 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.


NOTE:
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/mergemaser-suppress.sh:

# 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
do
    rm -f ${TEMPROOT-failsafe}/etc/${i}
done

# 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:

MM_PRE_COMPARE_SCRIPT=/root/bin/mergemaster-suppress.sh

Now you will have a much easier time with mergemaster!

  by: GhostRdr / Habeeb

Email Us

ghostrdr@defcon1.org

This site cannot be duplicated without permission

© 1998 - 2010 Defcon1, www.defcon1.org. 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 www.defcon1.org and the content's original author.