From owner-freebsd-current@FreeBSD.ORG Sun May 25 10:04:13 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0E0A737B401 for ; Sun, 25 May 2003 10:04:13 -0700 (PDT) Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1218C43F85 for ; Sun, 25 May 2003 10:04:00 -0700 (PDT) (envelope-from ru@whale.sunbay.crimea.ua) Received: from whale.sunbay.crimea.ua (ru@localhost [127.0.0.1]) h4PH2eEd076378 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 25 May 2003 20:02:47 +0300 (EEST) (envelope-from ru@whale.sunbay.crimea.ua) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.12.9/8.12.8/Submit) id h4PH2U9U076348; Sun, 25 May 2003 20:02:30 +0300 (EEST) (envelope-from ru) Date: Sun, 25 May 2003 20:02:30 +0300 From: Ruslan Ermilov To: Joshua Goodall Message-ID: <20030525170230.GA74239@sunbay.com> 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> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="RnlQjJ0d97Da+TV1" Content-Disposition: inline In-Reply-To: <20030525100559.GL91207@roughtrade.net> User-Agent: Mutt/1.5.4i cc: freebsd-current@freebsd.org Subject: Re: Updating -CURRENT, what about outdated files? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 May 2003 17:04:13 -0000 --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--