Subject: Re: Upgrading
To: Chris Jones <cjones@honors.montana.edu>
From: Chuck Robey <chuckr@glue.umd.edu>
List: port-pmax
Date: 05/01/1998 13:11:26
On Fri, 1 May 1998, Chris Jones wrote:

> On Fri, 1 May 1998, Simon Burge wrote:
> 
> > If you decide to upgrade manually, unpack all sets from the root
> > directory _except_ the etc.tgz set.  The etc set will overwrite your
> > existing configuration and log files.  I usually create a separate
> > directory and merge changes manually:
> 
> Also, if you upgrade manually, you can (or at least with previous versions
> of tar, you could) shoot yourself in the foot very easily by doing a
> normal sort of tar.  At one time at least, tar would by default open the
> destination file and start writing bytes into it, then close it when it
> was done.  If the file it opens is, say, the tar binary itself, which has
> a shared text segment, you can create massive trouble when the text
> segment on disk changes with respect to the partial text segment in core.
> If you "upgrade" shared libraries in this fashion, and they have the same
> version numbers as the old ones, *really* fun things start happening.
> 
> Instead, you may want to do this:
> 
> tar --unlink -x -z -v -p -f foo.tar.gz
> 
> The "--unlink" is the key option; it says to unlink the destination file,
> if it exists, before writing any data into it.  If the underlying inode is
> in use by any running processes, it'll hang around until said processes
> exit.

>From my previous experience with millions of FreeBSD installs, I was
under the impression that backing store was allocated for all binaries,
and if the binary was overwritten, the backing store wasn't, so an
upgrade in place was not dangerous ... OK, I'll do either that, or use a
private copy of tar.  Thanks much for the pointer, this could very well
have bitten me.

----------------------------+-----------------------------------------------
Chuck Robey                 | Interests include any kind of voice or data 
chuckr@glue.umd.edu         | communications topic, C programming, and Unix.
213 Lakeside Drive Apt T-1  |
Greenbelt, MD 20770         | I run Journey2 and picnic (FreeBSD-current)
(301) 220-2114              | and jaunt (NetBSD).
----------------------------+-----------------------------------------------