Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Mar 2010 07:18:26 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        "Michael D. Norwick" <mnorwick@centurytel.net>
Cc:        freebsd-questions <questions@freebsd.org>
Subject:   Re: When do binaries get removed?
Message-ID:  <4BB04632.1060301@infracaninophile.co.uk>
In-Reply-To: <4BB01B8D.5080702@centurytel.net>
References:  <4BB01B8D.5080702@centurytel.net>

next in thread | previous in thread | raw e-mail | index | archive | help
-----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-----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4BB04632.1060301>