[wplug-bsd] some basic freebsd hints please

Tom Rhodes trhodes at FreeBSD.org
Fri Mar 4 01:51:11 EST 2005

On Thu, 03 Mar 2005 23:05:30 -0500
Duncan Hutty <dhutty+wplug-bsd at ece.cmu.edu> wrote:

> Here are some initial questions I can't see covered in [Tom's] lovely 
> beastie handbook. Bear in mind that I am coming from a ./configure <lots 
> of custom options>, make && make install background of software 
> installation; most of my *nix usage is server only, although this is 
> changing at ECE.
> On my lovely new(!) Ultra5, one of the first things I installed was 
> bash. I used a package. And it was Good.
> Eager and encouraged, I thought I would try vim from a port, just for 
> practice before I started on some of the important stuff like 
> postfix/apache, that are this box's real purpose.
> #cd /usr/ports/editors/vim
> #make
> And it was Not Good. I'm not sure how not good it was, because it's 
> still going, but I noticed it making a new version of perl, which I 
> thought was slightly surprising since I had 5.8.5 already, and I saw 
> connections to gnome ftp sites for gtk and references to x11, which was 
> more surprising since this is a headless box that's not supposed to have 
> the x window system anywhere near it.

Why use vim?  I use vi even in exterms.  :)


%cd ` whereis vim | awk -F: '{print $2}'`
# make showconfig
===> No configuration options are set for this port

GRRRR!!!!  Damnit obrien!  FIX YOUR BLOODY PORT!!!

Ahem, anyway the options I see in the Makefile are:
.if defined(NO_GUI)
.if defined(WITH_CSCOPE)
.if defined(WITH_PYTHON)
.if defined(WITH_PERL)
.if defined(WITH_TCL)
.if !defined(WITHOUT_X11)
WITH_GNOME=     gtk12
.if defined(WITH_ATHENA)
.elif defined(WITH_GTK2)

So you could probably any of the following:

# echo "WITHOUT_X11" >> /etc/make.conf

and continue with every option, OR:

# cd /usr/ports/editors/vim && make NO_GUI=yes WITH_CSCOPE=no \
etc etc etc install clean


To not build anything run:
pkg_add -r vim


Install vim lite:
# cd /usr/ports/editors/vim-lite make install clean

> So clearly I should have done something equivalent to my familiar 
> ./configure before making. I would have done a ./configure --help first 
> to verify what I could fiddle with (read: remove support for, since this 
> box is elderly and presumably is not desperately snappy *and* is low on 
> memory). But there was no configure script in the port directory. Should 
> I have looked elsewhere for one? Should I have modified the Makefile 
> manually? What is the blessed method?

Nope, in FreeBSD most of the configure options are already done
and cleaned up for you.  Everything should install into /usr/local
or /usr/X11R6.  Some ports use menus (PHP5 for example) and others
use command line options (Sylpheed-claws for another).

Many of these options can also be placed in /etc/make.conf, you
shouldn't need the "= true" or "= yes" comments.  The reason
for that is defined() only checks for a defined environment, and
as such, you need not provide any false value.

> If I do a make deinstall to remove the offending, overlarge vim, will it 
> remove all the other crap that it pulled in as dependencies? Is there 
> somewhere the activities are recorded so I can manually remove each one?

Actually, there are a few things here.  Using the 'make deinstall'
will only deinstall that port.  You could:

deinstall all ports:
# pkg_delete /var/db/pkg/*


Install portupgrade:
# cd /usr/ports/sysutils/portupgrade && make install clean &&\
? rehash && pkgdb -F

to help manage your packages


Install pkg-cutleaves which will allow you to 'clean up' useless
ports/packages.  I think Bill knows about this utility better than
I do since I manage everything manually.  :P

> Feel free to tell me that all this is covered in the Handbook if it is, 
> and I shall feel foolish but read it thoroughly before bothering you 
> again, instead of looking over the whole and only reading sections that 
> appeared to be relevant.

The following issues come to mind:

1: The handbook doesn't explain what I have as in depth, someone
   should fix that ... anyone but me.

2: We really need a way to catalog why and when every port was
   installed so an administrator can print out a list of ports
   that were installed with what other ports and so on.  Perhaps
   one already exists and Bill hasn't ranted or raved about it
   to me yet.

3: This email was never ment to be this long.

Tom Rhodes

More information about the wplug-bsd mailing list