On Oct 6, 2008, at 5:52 PM, Mel wrote:
On Monday 06 October 2008 21:28:25 Kelly Jones wrote:
Here's one way to install multiple FreeBSD ports "unattended" on a
cd /usr/port/foo/prog1; make install; cd/usr/ports/foo/prog2; make
and so on (perhaps even in a shell script). Two problems:
% It's ugly. I'd prefer "cd /usr/ports; make foo/prog1 foo/prog2 ..."
% "make install" often pops up windows asking me to choose
configuration options, and hangs until I do so.
As others said, BATCH turns off config target. But don't
clutter /etc/make.conf with stuff like that, cause you will forget
you put it
there. make -DBATCH is short enough to type.
It is however useful to inspect pkg-install files and set variables in
either /etc/make.conf or /etc/(profile|login.conf). For example
POSTFIX_DEFAULT_MTA will replace /etc/mail/mailer.conf when -DBATCH
Over time you'll pick up quite a few of these that save you doing
thing all over.
Either one of:
# cd /usr/ports/foo/bar; env BATCH=yes make install clean
# cd /usr/ports/foo/bar; make -DBATCH install clean
will work. Both are cleaner than sticking "BATCH = yes" into /etc/
make.conf. You should watch out for three things here.
1. This writes files into the ports database (/var/db/
something...) that sets the configuration of the port the knobs so to
speak. So building for example postfix this way will get you a postfix
that doesn't have SASL or LDAP or whatever you may actually want.
Effectively this sets all the ports "knobs" to the defaults. To chose
the knobs on a particular port visit the directory and run make config:
# cd /usr/ports/mail/postfix; make config
Once you've got the port configured correctly you can run make clean;
make deinstall; make install to build and reinstall it to your specs.
2. You may not get exactly want you want. In fact the process my
stall in the middle because of conflicts. In the nicest case you will
end up with multiple ports that do the same thing. Building postfix
with LDAP support for example is likely to result in two copies of the
Berkeley Database port being installed. This is okay if they don't
conflict. The build will fail if they do. I've seen this a lot on
things that need LDAP. Some ports want version 2.3 and others want
version 2.4 To get past this you need to figure out which
WITH_<port>_VER/WANT_<port>_VER variables you need to tweak and for
that you will need to add to /etc/make.conf
3. You may not get all the pieces that you need. Note carefully
that some ports are split into client and server pieces. This largely
affects databases (MySQL / PostgreSQL).
Chris Hilton e: chris|at|vindaloo|
"The pattern juggler lifts his hand; The orchestra
As slowly turns the grinding wheel in the court of the crimson
-- Ian McDonald / Peter
firstname.lastname@example.org mailing list
To unsubscribe, send any mail to "[EMAIL PROTECTED]"