Slashdot Mirror


Painlessly Update FreeBSD

boarder8925 writes "Over at BSDnews, Steve Wingate has written an article on how to easily update FreeBSD. Wingate begins his article by saying, "One of the greatest advantages that *BSD has over other Unix variants is the cvsup/make world process. Unlike most Linux distributions it isn't necessary to wait months for a new version to be released for you to upgrade your system. The cvsup/make world process allows you to update your system at any time. I'm going to show you how to make the process as painless as possible." The article discusses the following: installing CVSup, choosing a cvsup server, configuring make.conf, and, finally, performing the upgrade. The piece is also available as a .pdf file."

7 of 123 comments (clear)

  1. That's the easy solution? by cperciva · · Score: 4, Insightful

    If cvsup && buildworld && installworld is the easy solution, I wonder what he considers this to be:

    freebsd-update fetch
    freebsd-update install


    Yeah, ok, FreeBSD Update is only about tracking the release branch. But really, this story just covers the standard technique which people have been using for... well, longer than I've been using FreeBSD.

  2. too many dependencies by hak1du · · Score: 4, Insightful

    Given the amount of software I have on my Linux box, I think a BSD/Gentoo-like build process just wouldn't be practical for me.

    The underlying problem is really that C/C++ code has so much information compiled into each object file: even common, minor changes may require huge amounts of recompilation. While we practice abstraction and encapsulation at the source level, at the binary level, it is still mostly lacking.

    The choice shouldn't been between huge amounts of recompilation from source (Gentoo, BSD) or laborious hand-packging and version tracking (Debian, RedHat, etc.), this needs to be addressed by changing the underlying software infrastructure. Let's hope we'll move more towards JITs, dynamic binding, dynamic typing, and component-based software. Then we can finally get away from these massive recompilations and version hell.

  3. Re:cvsup in C? by CoolVibe · · Score: 4, Interesting

    There's also cvsync, which is a good cvsup alternative, written in C.

  4. Re:Gentoo has this.. by UnseenEnigma · · Score: 4, Interesting

    The only issue with gentoo is the lack of a central binary repository like the redhat channels system (official anyway - chinstrap is decent for those willing to stray). It was discussed at great length several months ago and decided not to be created despite having the backend infrastructure already in place. The great advantage of gentoo, and in a way the failure of bsd (and pretty much every commercial linux) is the ability to choose complex compile and build options with ease. For this same reason and the fact a binary repository could never handle a fraction of the possibilities it was never created :(. If however you consider implementing gentoo in a work environment with say 10-100 systems they could all be set to use a central compile server to your organisation or/and through distcc compile kickass fast! Although installs of gentoo are a pain (hopefully better if the installer gets built) it is by far the easiest to update, and customise of any linux. And (big + for me) none of the bs of no or modified media players, browsers, burner software etc of suse, redhat or mandrake because of cautios legal practises. I've been finding more and more things i like about the portage system the more i use it. Any new reasonably popular package seems to make it on the tree in less than a day. If their is a piece of software that isnt on the tree u need (happened to me once) u can either find or make a ebuild and submit it for inclusion in the tree My Conclusions Ms Windows - ah get it away from me!!!! Evil Redhat/Suse/Mandrake - Better but canabalises some stuff and out of date packages The BSD Trio - Stable, fast, easy update, and faster update due to binary Gentoo - Stable, fast, easy update and more customizable due to all source (usually)

  5. Issue #3?November 9, 2003 by beefdart · · Score: 4, Interesting

    I was scanning this... Got 1/2 way through and was wondering if he stole it, cause I swore i read it somewhere.

    Then I realized: Issue #3?November 9, 2003

    How the hell is this news? I love FreeBSD, its all I use. the only thing dead about it is bsd.slashdot.org

  6. Re:Anonymous Coward's Guide to Updating Debian by rsax · · Score: 5, Insightful

    Yes APT is great. It's easy to use and requires less effort than the FreeBSD upgrade process but it's too bad Debian stable is so hopelessly out of date. FreeBSD isn't. It's a stable operating system with upto date third party software delivered using the ports system. I've said this before and I'll say it again since this Debian comparison has been brought up.... I hear this argument from Debian advocates a lot: "Do you want a stable server or do you want bleeding edge?" Well with FreeBSD I get stable servers and still have packages that aren't a year or two [or sometimes more] old...... it is possible. And before anyone recommends that I run Debian testing instead please remember that the Debian Security team claim that they don't support anything besides the stable releases. I could use a Debian stable system and then mix match packages from unstable or testing and risk instability in the end or higher maintenance due to no security alerts from one source but then why not use FreeBSD instead in the first place?

  7. It's more risky than following the handbook. by TheLink · · Score: 4, Informative

    The article is actually riskier IMO.

    Firstly: he doesn't track the RELENG_4_9 branch, he tracks the STABLE branch (RELENG_4 - e.g. the latest of whatever is considered stable for Release 4) - which is more likely to break working stuff than the RELENG_4_9 branch which is FreeBSD 4.9 that has just the updates for security problems. Yes many ppl don't have problems with RELENG_4, but if your job and reputation is on the line - only use it if RELENG_4_9 doesn't work (hardware, required features etc).

    Secondly: He skips the mergemaster -p step.

    The way I recommend is what's been in the FreeBSD handbook for years:
    Step 1: Synchronize your source Use cvsup. It's better. And track the RELENG branch.
    e.g. cvsup mycustomcvsupfile
    Where mycustomcvsup is like the stable-supfile but with the following tag instead of RELENG_4:
    *default release=cvs tag=RELENG_4_9

    Step 2: Building and Installing world

    optional step before:
    cp /etc/defaults/make.conf /etc/make.conf
    edit /etc/make.conf accordingly (compile options, whether ports openssl/openssh overwrites the base openssl/openssh etc)

    Then
    make buildworld
    make buildkernel KERNCONF=YOURKERNELNAME
    make installkernel KERNCONF=YOURKERNELNAME
    reboot and go to single user mode
    mergemaster -p
    (preliminary mergemaster stuff if things are too different between your config and what the new FreeBSD stuff is)
    make installworld
    mergemaster
    (to merge what's new in /etc and stuff to what your local custom config is like)
    reboot

    ***multiple machines.
    Here's where you might do things differently.

    Read this for some background: tracking for multiple machines

    Now once you built everything, you don't have to rebuild it on a different machine if you are using a compatible architecture. For example you specify a 686 CPU in your make.conf and kernel config, you can only reuse it on stuff which supports 686 class CPUs.

    I didn't bother with the NFS part (not applicable for some situations) - I just did the synchronize of src and ports and did the build on a fast machine with a fast connection.

    The default was 4-stable which tracks the current stable source of Release 4. For production machines I recommend tracking RELENG releases and not STABLE.

    Then build the kernel and sources.
    cd /usr/src
    make buildkernel KERNCONF=kernelformachineA
    make buildkernel KERNCONF=kernelformachineB
    make buildkernel KERNCONF=kernelformachineC
    make buildworld
    cd /usr/
    Then tarball the results: tar -zcvf src.tar.gz src && tar -zcvf obj.tar.gz obj && tar -zcvf ports.tar.gz ports

    Then I copied the tarballs (via CDR) to the slow machine which did not have a cvsup connection (not allowed by firewall policy etc)

    Then installed the results on the machine.
    cd /usr
    rm -rf src obj ports
    tar -zxvf src.tar.gz && tar -zxvf ports.tar.gz && tar -zxvf obj.tar.gz

    Then I ensured that the /etc/make.conf was correct etc.
    Then: make installkernel KERNCONF=therelevantkernel && make installworld.

    Note: to save the trouble of building desired ports software on the slow machine you have to make packages on the fast machine.
    e.g.
    cd /usr/ports/blahblah/softwarename
    make package
    ---
    You should also check out freebsd-update.

    freebsd-update is more like binary updating of stuff affected by security issues.

    Redhat is simpler on one hand and more complex on the other- sure you can ftp all the rpms and run a freshen. But it's harder to be sure everything is really consistent

    --