Date: Wed, 17 Jan 2007 12:19:11 -0800 From: Doug Barton <dougb@FreeBSD.org> To: Tom Judge <tom@tomjudge.com> Cc: freebsd-stable@freebsd.org Subject: Re: Removing unused core components. (Disabled in make.conf) Message-ID: <45AE84BF.2070204@FreeBSD.org> In-Reply-To: <45AE68DE.7060304@tomjudge.com> References: <45AE68DE.7060304@tomjudge.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45AE84BF.2070204>