Installing multiple ports quietly and efficiently

2008-10-06 Thread Kelly Jones
Here's one way to install multiple FreeBSD ports unattended on a
machine:

cd /usr/port/foo/prog1; make install; cd/usr/ports/foo/prog2; make install

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.

I want to install 50 apps on a new server, but not have to watch it
constantly. I want to tell ports: just use the default options for
now: if I'm unhappy w/ them, I'll come back, do a 'make rmconfig' and
rebuild.

How can I do this?

-- 
We're just a Bunch Of Regular Guys, a collective group that's trying
to understand and assimilate technology. We feel that resistance to
new ideas and technology is unwise and ultimately futile.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Installing multiple ports quietly and efficiently

2008-10-06 Thread Vincent Hoffman
Kelly Jones wrote:
 Here's one way to install multiple FreeBSD ports unattended on a
 machine:

 cd /usr/port/foo/prog1; make install; cd/usr/ports/foo/prog2; make install

 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 ...
   
I'd suggest using portupgrade then just
portinstall prog1 prog2 prog3

  % make install often pops up windows asking me to choose
  configuration options, and hangs until I do so.

   
 I want to install 50 apps on a new server, but not have to watch it
 constantly. I want to tell ports: just use the default options for
 now: if I'm unhappy w/ them, I'll come back, do a 'make rmconfig' and
 rebuild.

 How can I do this?

   
add
BATCH=yes
to /etc/make.conf


Vince
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Installing multiple ports quietly and efficiently

2008-10-06 Thread Robert Huff

Vincent Hoffman writes:

   I want to install 50 apps on a new server, but not have to watch it
   constantly. I want to tell ports: just use the default options for
   now: if I'm unhappy w/ them, I'll come back, do a 'make rmconfig' and
   rebuild.
  
   How can I do this?

  add
  BATCH=yes
  to /etc/make.conf

Only if you remember to take it out (or comment it out) again
when you're done.
Personally, I'd run a new shell, set the variable, do the
builds, then kill the shell. Next: edit make.conf and put it in
comented out and with additional comments.


Robert Huff

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Installing multiple ports quietly and efficiently

2008-10-06 Thread Mel
On Monday 06 October 2008 21:28:25 Kelly Jones wrote:
 Here's one way to install multiple FreeBSD ports unattended on a
 machine:

 cd /usr/port/foo/prog1; make install; cd/usr/ports/foo/prog2; make install

 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 is set. 
Over time you'll pick up quite a few of these that save you doing the same 
thing all over.

-- 
Mel

Problem with today's modular software: they start with the modules
and never get to the software part.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Installing multiple ports quietly and efficiently

2008-10-06 Thread Christopher Sean Hilton


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
machine:

cd /usr/port/foo/prog1; make install; cd/usr/ports/foo/prog2; make  
install


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  
is set.
Over time you'll pick up quite a few of these that save you doing  
the same

thing all over.



Either one of:

 # cd /usr/ports/foo/bar; env BATCH=yes make install clean

of
 # 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

Chris Hilton   e: chris|at|vindaloo| 
dot|com


  The pattern juggler lifts his hand; The orchestra  
begin.
  As slowly turns the grinding wheel in the court of the crimson  
king.
   -- Ian McDonald / Peter  
Sinfield




___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]