From owner-freebsd-stable Tue Jun 5 12:45:11 2001 Delivered-To: freebsd-stable@freebsd.org Received: from ms58.hinet.net (ms58.hinet.net [168.95.4.58]) by hub.freebsd.org (Postfix) with ESMTP id F303D37B40B; Tue, 5 Jun 2001 12:44:55 -0700 (PDT) (envelope-from clive@tongi.org) Received: from cartier.cirx.org (null@cartier.cirx.org [211.72.15.243]) by ms58.hinet.net (8.8.8/8.8.8) with ESMTP id DAA14760; Wed, 6 Jun 2001 03:44:38 +0800 (CST) Received: from cartier.cirx.org (nullmail@localhost [127.0.0.1]) by cartier.cirx.org (8.11.4/8.11.4) with SMTP id f55JiU825589; Wed, 6 Jun 2001 03:44:30 +0800 (CST) (envelope-from clive@tongi.org) Received: (nullmailer pid 25585 invoked by uid 1000); Tue, 05 Jun 2001 19:44:29 -0000 Date: Wed, 6 Jun 2001 03:44:29 +0800 From: Clive Lin To: Nick Sayer Cc: Stephan van Beerschoten , Hajimu UMEMOTO , freebsd-current@FreeBSD.ORG, freebsd-stable@FreeBSD.ORG Subject: Re: post installworld cleanup (was Re: usr.sbin/pim6[sd]d will be removed soon.) Message-ID: <20010606034428.A25392@cartier.cirx.org> References: <20010603.013827.112367504.ume@mahoroba.org> <20010605105226.A59565@enigma.whacky.net> <3B1D2A36.2030405@quack.kfu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3B1D2A36.2030405@quack.kfu.com>; from nsayer@quack.kfu.com on Tue, Jun 05, 2001 at 11:51:34AM -0700 X-PGP-key: http://www.cirx.org/~clive/clive.asc Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Heh, well, someone is talking about clearing stale files ! :) I want to discuss about this topic many times, but don't know which mailing list is proper for it.. Here is my way to clean stale files, which requires lots space and time, but IMHO it's very safe and requires no special tricks. (Okay okay, brute force, anyways) First of all, I'll installworld to another directory _2 times_. The reason for 2 times is, some openssl/*.ph wouldn't be created in the first installworld. my buildchroot.sh : #!/bin/sh D=/home/nexus/chroot mkdir $D make installworld DESTDIR=$D cd etc make distribution DESTDIR=$D cd .. make installworld DESTDIR=$D After the virgin world is done, I use another stupid script to generate the diff bewteen the virgin one and the live one. my staleclean.sh : #!/bin/sh # usr cd /home/nexus/chroot/usr find bin/ include/ libdata/ sbin/ games/ lib/ libexec/ share/ | sort >/tmp/new cd /usr find bin/ include/ libdata/ sbin/ games/ lib/ libexec/ share/ | sort >/tmp/old diff -u /tmp/old /tmp/new | grep -e '^-' | sed -e 's/-//' > /tmp/usr.delist # bin, sbin cd /home/nexus/chroot find bin/ sbin/ | sort > /tmp/new cd / find bin/ sbin/ | sort > /tmp/old diff -u /tmp/old /tmp/new | grep -e '^-' | sed -e 's/-//' > /tmp/bin.delist Okay, this is not perfect. Before piping these .dellist files to xargs, some editing is needed. BTW, there're really *many many* things keep changing in -CURRENT :-) Each time I start to clear stale files, they're counted by hundreds. On Tue, Jun 05, 2001 at 11:51:34AM -0700, Nick Sayer wrote: > After installworlds I routinely do an ls -altr on "the usual suspects", > which for me include: > > /bin, /sbin, /usr/bin, /usr/sbin, /usr/libexec and /usr/lib. > > /usr/lib must be done carefully. If it matches (this is a regex) > lib\..*\.so\.[0-9]+ then you should move it into /usr/lib/compat rather > than delete it. Just deleting them will cause any programs in /usr/X11R6 > or /usr/local that were linked against the old libraries to stop > working. /usr/libexec/ld.so* also sometimes appear to be out of date but > really aren't. One of them is the a.out ld.so and if you have 1.x compat > libraries loaded you will need to leave that file alone despite it > having a very old date. > > Anything else that is older than the starting time of the last 'make > installworld' in these directories can probably be deleted. > > For extra credit you can do this to /usr/share/man/man* as well. It also > may not be a bad idea to rm -f /usr/share/man/cat*/* to make doubly sure > that obsolete man pages don't show up. -- Clive Lin (Tong-I Lin)\n =P clive@tongi.org # Family, friends, private affairs\n =F clive@FreeBSD.org # Chinese ports, documentation\n =O clive@CirX.ORG # Others\n =J.* # What do you think about the 'J' ?\n To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message