From owner-freebsd-stable@FreeBSD.ORG Wed Jan 17 20:19:20 2007 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EFFEB16A412 for ; Wed, 17 Jan 2007 20:19:20 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with SMTP id 9434213C467 for ; Wed, 17 Jan 2007 20:19:20 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 22928 invoked by uid 399); 17 Jan 2007 20:19:19 -0000 Received: from localhost (HELO ?192.168.0.5?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 17 Jan 2007 20:19:19 -0000 X-Originating-IP: 127.0.0.1 Message-ID: <45AE84BF.2070204@FreeBSD.org> Date: Wed, 17 Jan 2007 12:19:11 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: Tom Judge References: <45AE68DE.7060304@tomjudge.com> In-Reply-To: <45AE68DE.7060304@tomjudge.com> X-Enigmail-Version: 0.94.1.1 Content-Type: multipart/mixed; boundary="------------070301040407050709070101" Cc: freebsd-stable@freebsd.org Subject: Re: Removing unused core components. (Disabled in make.conf) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jan 2007 20:19:21 -0000 This is a multi-part message in MIME format. --------------070301040407050709070101 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Tom Judge wrote: > Hi, > > I have the following options in /etc/make.conf: > > NO_PROFILE=true > NO_SENDMAIL=true > NO_GAMES=true > NO_I4B=true > NO_ATM=true > NO_INET6=true > NO_BLUETOOTH=true > NO_IPFILTER=true > NO_RCMDS=true > NO_KERBEROS=true > > > However after a "make buildworld installworld" the utilities and libs > associated with these packages are still installed, is there any easy > way to remove them from the system? I've used the following successfully for a long time: doinstall () { cd /usr && [ -d include-old ] && /bin/rm -r include-old; [ ! -e include-old ] && mv -i include include-old; /bin/rm -r /usr/share/man; cd /usr/src && touch /var/tmp/installdate && make installworld } Then I use the attached script to delete things that weren't installed above. One caveat, if you did not clean out /usr/obj before you built the world, valid libraries will show up as older than the install because of how the file dates are set in bsd.lib.mk. So, if you cleared out /usr/obj before your build, then you can mv the libraries safely. If you didn't, when the first library comes up hit q. hth, Doug -- This .signature sanitized for your protection --------------070301040407050709070101 Content-Type: text/plain; name="after_installworld" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="after_installworld" #!/bin/sh PATH=/usr/bin:/bin export PATH for dir in /bin /libexec /rescue /sbin /usr/bin /usr/games /usr/libdata \ /usr/libexec /usr/sbin /usr/share/games /usr/lib /lib ; do if [ ! -d "$dir" ]; then continue; fi for file in `find $dir \( -type f -o -type l \) -a \ ! -newer /var/tmp/installdate`; do case "${file}" in /usr/lib/compat/*|*/0ld/*|/usr/libdata/perl/*) ;; */libexec/ld-elf.so.1*|/sbin/init.bak|/usr/bin/perl*) ;; *) echo '' ls -lao ${file} read -p " *** Move ${file} to ${file%/*}/0ld? [n] " M case ${M} in [yY]*) mkdir -p ${file%/*}/0ld chflags 0 ${file} && mv -i ${file} ${file%/*}/0ld/ ;; [qQ]) exit 0 ;; esac ;; esac done done exit 0 --------------070301040407050709070101--