Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 May 2003 20:02:30 +0300
From:      Ruslan Ermilov <ru@freebsd.org>
To:        Joshua Goodall <joshua@roughtrade.net>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Updating -CURRENT, what about outdated files?
Message-ID:  <20030525170230.GA74239@sunbay.com>
In-Reply-To: <20030525100559.GL91207@roughtrade.net>
References:  <20030523203517.GA93787@attbi.com> <20030524034419.GA63643@sunbay.com> <20030524084432.GA509@roughtrade.net> <20030524174817.GA42456@sunbay.com> <20030525074823.GK91207@roughtrade.net> <20030525084344.GA26791@sunbay.com> <20030525100559.GL91207@roughtrade.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--RnlQjJ0d97Da+TV1
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, May 25, 2003 at 08:05:59PM +1000, Joshua Goodall wrote:
> On Sun, May 25, 2003 at 11:43:44AM +0300, Ruslan Ermilov wrote:
> > But you don't often know if installworld attemps to install it
> > or not, if it wasn't here:
> >=20
> > src/sys/boot/i386/loader/Makefile:
> >=20
> > beforeinstall:
> > ...
> > .if !exists(${DESTDIR}/boot/loader.rc)
> > 	${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
> > 		${.CURDIR}/../../forth/loader.rc ${DESTDIR}/boot
> > .endif
> >=20
> > > Other than the general case of using install -C, can you
> > > point out any specific examples?  I thought that was the point
> > > of mergemaster; to manage elements of the distribution where
> > > simply overwriting would be inappropriate.
>=20
> > Nope, mergemaster(8) deals with updating of /etc only, unless
> > I'm horribly mistaken (I don't use it personally, but pretty
> > much do what it does manually).
>=20
> What you just said implies that installing world+kernel, then running
> mergemaster, does not update every part of a FreeBSD base system
> installation, modulo ports and make.conf knobs.
>=20
It doesn't, mergemaster(8) only covers the set of files produced by
"make distribution" from src/etc/Makefile.  These are /dev, /etc, /root,
and /var/log files, with a few minor exceptions like /COPYRIGHT, /.cshrc,
/.profile, and /var/run.

> I knew that already about /stand.  I didn't realise it extended elsewhere.
> Perhaps because I lack install-fu.
>=20
I remove /stand as soon as I install the system.  It will soon be
replaced in 5.x with some very useful stuff (/rescue).

> I confess that my Astonishment meter just twitched a little. Any
> reason why /boot/loader.rc *shouldn't* be under mergemaster control?
>=20
It cannot be, because it's installed by "installworld" and not
the "distribution" from src/etc/Makefile.

To install a fresh system, one needs to "installworld" first, then
run "make distribution" from src/etc/.  That gives a fresh system,
pretty much like after the initial installation, with an empty
root password in /etc/master.passwd, etc.  (Never ever run this on
a running system without also specifying DESTDIR=3D/somewhere, like
mergemaster(8) does for you!)

> At any rate, I'd expect to catch-and-document special cases, if
> only through a find-and-diff.
>=20
To summarize, mergemaster(8) only adds/updates/removes files from
the "make distribution" set.  The files from "installworld" are
unaffected.  I use find(1) to clean the "installworld" leftovers,
and I use the procedure similar to what is done by mergemaster(8)
to clean the "make distribution" set of files: my /var/tmp on
each machine has two directories, e.g., 20021204/ and 20030415/,
that are populated by the "make distribution" outputs from their
respective dates.  If I'd be about to upgrade this system today,
as the last step, I would create the 20030525 directory, populate
it with "make distribution", and then diff(1) compare it against
20030415/ (and remove 20021204/).

You can always have a fresh system by using this sequence:

rm -rf /somewhere && mkdir -p /somewhere
cd /usr/src && make DESTDIR=3D/somewhere installworld
cd /usr/src/etc && make DESTDIR=3D/somewhere distribution
diff(1) compare "/" and "/somewhere"

Hint: the -q option to diff(1) is very handy here, as it
optimizes the case where two files differ in size.


Cheers,
--=20
Ruslan Ermilov		Sysadmin and DBA,
ru@sunbay.com		Sunbay Software AG,
ru@FreeBSD.org		FreeBSD committer,
+380.652.512.251	Simferopol, Ukraine

http://www.FreeBSD.org	The Power To Serve
http://www.oracle.com	Enabling The Information Age

--RnlQjJ0d97Da+TV1
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)

iD8DBQE+0PclUkv4P6juNwoRAuS/AJ4yxixWnmY9RgYub6J9n1xlsHN3DwCeLZsw
k1QNHPKd132shmE9A2/fnZU=
=nbBC
-----END PGP SIGNATURE-----

--RnlQjJ0d97Da+TV1--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030525170230.GA74239>