From owner-freebsd-questions@FreeBSD.ORG Mon Mar 29 06:18:38 2010 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6098C1065676 for ; Mon, 29 Mar 2010 06:18:38 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (gate6.infracaninophile.co.uk [IPv6:2001:8b0:151:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id B2B0B8FC18 for ; Mon, 29 Mar 2010 06:18:37 +0000 (UTC) Received: from seedling.black-earth.co.uk (seedling.black-earth.co.uk [81.187.76.163]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.4/8.14.4) with ESMTP id o2T6IQ3H058910 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 29 Mar 2010 07:18:26 +0100 (BST) (envelope-from m.seaman@infracaninophile.co.uk) Message-ID: <4BB04632.1060301@infracaninophile.co.uk> Date: Mon, 29 Mar 2010 07:18:26 +0100 From: Matthew Seaman Organization: Infracaninophile User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-GB; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: "Michael D. Norwick" References: <4BB01B8D.5080702@centurytel.net> In-Reply-To: <4BB01B8D.5080702@centurytel.net> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.95.3 at happy-idiot-talk.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_ADSP_ALL, SPF_FAIL autolearn=no version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on happy-idiot-talk.infracaninophile.co.uk Cc: freebsd-questions Subject: Re: When do binaries get removed? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 06:18:38 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 29/03/2010 04:16:29, Michael D. Norwick wrote: > I have the current FreeBSD handbook but it does not seem to have the > answer to the following question. > When building and installing an application from ports, how does the > original binary or script, in /usr/bin, /usr/lib, /etc..., from the > distribution, get removed? The make install foo command does not appear > to symlink the original application location to the new one in > /usr/local/whatever. Does it even matter? From reading various docs > on-line tonight it seems it might. Simple answer: they don't get removed at all. It doesn't matter. More complex answer: in general, ports are only allowed to make changes under the ${LOCALBASE} directory, which is almost always /usr/local. There are a small number of exceptions to this rule. Outside /usr/local belongs to the base system. So what happens when you install a port which duplicates some of the programs from the base? There are a few possibilities: * Nothing. Eg. dns/bind97 -- you get the newer bind software by specifying the path explicitly * Compile time effect. Eg. security/openssl -- you set a variable in /etc/make.conf to make all your ported software link against the new version rather than the base version. * /etc/mailer.conf -- for MTAs only. mail/sendmail from ports is treated as just another MTA and the same mechanism for switching to eg postfix or exim is used to allow switching to mail/sendmail There are also some applications like perl where the world expects them to be in /usr/bin against the ports conventions, and this is provided by creating appropriate symbolic links. Since perl hasn't been in the base for many years this isn't strictly relevant to your question, but it's the same sort of thing. Now, although this takes up a bit of extra disk space (and it trips up people who don't know how to modify their $PATH or set up shell aliases) in general, having similar programs installed in two different places doesn't actually hurt. Disk space is cheap. If you really must remove the old version, then there are a number of variables that you can set in src.conf(5) to disable building certain software packages. You have to rebuild and reinstall your system after changing those flags -- but beware: get it wrong and you can seriously damage your uptime. Some, but not all, of those settings will cause the excluded files to be added to the obsolete files list, so you can remove the unwanted bits at the 'make delete-old' stage. Others you have to deal with manually. Some ports have options to overwrite bits of the base system. Avoid using those options. Unless you have a very strictly controlled patching and updating policy (because you are eg. a company like Yahoo with a large number of servers to manage), chances are using 'overwrite base' will end in tears, or at least, a horrible mess with the ports and the base system fighting over the same disk locations. Cheers, Matthew - -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.14 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkuwRjIACgkQ8Mjk52CukIwa3QCfQjvUZHL4ROYvtY2bx9/XlQ/f 60IAmwbDHG6Y2O3mwIS+xebk7mvI913D =Flhi -----END PGP SIGNATURE-----