Date: Mon, 24 Jun 2002 21:03:37 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Margie W <walemom@yahoo.com> Cc: FreeBSD-Questions@FreeBSD.ORG Subject: Re: Least Painful Upgrade Path Message-ID: <20020624200337.GB10465@happy-idiot-talk.infracaninophi> In-Reply-To: <20020624184757.61593.qmail@web11008.mail.yahoo.com> References: <20020624184757.61593.qmail@web11008.mail.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jun 24, 2002 at 11:47:57AM -0700, Margie W wrote: > I have a system built about a month ago with > 4.5-STABLE. One of the packages I installed at that > time was Apache-2.0.35. I need to upgrade that > package to 2.0.39 due to the security bug discovered > last week. > Is the easiest upgrade path to backup the site > content, uninstall the package, and then re-install > .39... then recreate the document directories.. and > restore the content? That's pretty much it, if you're going to use pre-compiled packages. However, while you should certainly back up your documents and httpd.conf files in case of accidents. pkg_delete(1) shouldn't touch /usr/local/etc/apache2/httpd.conf. Neither will it remove any files from /usr/local/www/data or /usr/local/www/cgi-bin *so long* as you've made sure they are distinct from /usr/local/www/data.default or /usr/local/www/cgi-bin.default. Which means that you should be able to do: pkg_delete -f apache-2.0.35 pkg_add -r ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-4-stable/All/apache-2.0.39.tgz and be pretty much ready to go. However, apache-2.0.39.tgz doesn't seem to have hit the ftp mirrors quite yet. > Does pkg_add have a command line "upgrade" flag that I > can use that automates all this? Not as such. Perhaps your best bet is the highly recommended `portupgrade' suite of programs. Try grabbing the portupgrade-20020429.tgz package and the packages it depends on from one of the mirrors: % pkg_info -r portupgrade-\* Information for portupgrade-20020429_1: Depends on: ruby-1.6.7.2002.05.23 ruby-shim-ruby18-1.7.2.2002.05.21 ruby-optparse-0.8.6 ruby-bdb1-0.1.7 pkg_tarup-1.2_3 (pkg_add -r should grab the dependencies automatically.) > I've seen people mention CVS, which I'm not very > familiar with. From what I've read, that seems the > best bet for performing a system-wide code > update/upgrade (I think people refer to this as a > 'build world', right?)... but overkill for one > package. Esp if I have to manually compose a > functional Makefile and recompile the whole system. Uh --- no. You don't need to know anything about CVS or need to write any Makefiles to recompile the system from source -- usually described as `make buildworld', but necessarily followed by: make buildkernel make installkernel reboot (to single user mode) make installworld mergemaster reboot Similarly it's almost a no-brainer to use the ports system to install software from source. You don't need to know much at all about programming to be able to use ports: the usual procedure to install some software --- say apache-2.0.39 --- goes something like this: cd /usr/ports/www/apache2 make install What you should observe is the apache2 source code being downloaded, unpacked, patches applied, compiled, installed and the whole deal recorded in the /var/db/pkg database. If the port has dependencies on other ports, they will be downloaded, built and installed automatically. Just from those two commands. That's the point of ports --- all the hard work is done for you... Of course, if you're going to compile stuff from source, you obviously need to get hold of it. Similarly you need to grab the ports tree if you want to install ports from source code. cvsup is the way to go to do that. Look at http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/cutting-edge.html (Chapter 19 of the handbook) http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html and http://www.polstra.com/projects/freeware/CVSup/faq.html for instructions. > How do your answers change if I said I had a > 4.0-STABLE system that I wanted to fully upgrade to > 4.6, inc all packages/(custom) kernel. CVSsup? (I > do, but it's another system that I can worry about > later.) I'm a big fan of upgrading from source, but the jump from 4.0 to 4.6 is a bit tricky. Hunt through the mailing list archives (-questions, -stable) for war stories. It's doable, but you're probably going to find it a lot easier to simply reinstall with 4.6. Once you've got the base system upto date, use `cvsup' to grab the latest ports and `portupgrade' to upgrade to the latest versions of all your installed software. If the box has X installed, you probably need to de-install the X-3.3.x that was current with FreeBSD 4.0 and replace it with the X-4.2.0 that's current now. Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way Tel: +44 1628 476614 Marlow Fax: +44 0870 0522645 Bucks., SL7 1TH UK To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020624200337.GB10465>