Re: batching port builds

2006-07-02 Thread Nikolas Britton

On 6/30/06, Kevin Kinsey [EMAIL PROTECTED] wrote:

Michael P. Soulier wrote:
 On 30/06/06 David J Brooks said:

 If you  do 'make -DBATCH' instead of 'make' -  you will use the preset
 defaults for each port with options. Or you can do
 'make config-recursive' - which will offer you all the option screens for
 the port in whose directory you're currently in and all its dependencies.

 See 'man ports' for more information.

 To use those with 'portupgrade -a' will probably take some custom scripting.

 Ah, so there's no make.conf option for this?


??  You can even set BATCH=yes in your environment.  I'm
pretty sure you can in make.conf, also, but IIRC you might
not want to do that . . .



Why??? What I do is set BATCH=yes in make.conf and If I need to change
the default options I use a if block in make.conf:

.if ${.CURDIR:M*/databases/mysql*}
BROKEN=yes
.endif

.if ${.CURDIR:M*/www/horde*}
WITHOUT_MYSQL=yes WITH_POSTGRESQL=yes
.endif

.if ${.CURDIR:M*/foo/bar}
baz
.endif

Et Cetera, etc.

The first one halts any port that wants MySQL as a dependence. The
rest is self explanatory. You can also put any make option in them
because it works like a Makefile, here is an imaginary example:

.if ${.CURDIR:M*/www/firefox*}
PORTNAME=opera
DISTVERSION=18
CPUTYPE=athlon512
MASTER_SITE_OVERRIDE=http://foobar
PERL_VER=8.6.5
PERL_VERSION=8.6.5
WANT_GNOME=no-way
WANT_QT=hell-yes
CFLAGS+= -O3
USE_GCC=10
OSVERSION=120
.include ${.CURDIR}/../../x11/kde3/Makefile
.endif




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


Re: batching port builds

2006-07-01 Thread Javier Echaiz

You can put BATCH=yes in your /etc/make.conf

The settings for each port (if it has something to config) are stored
in /var/db/ports/{port dir name}/options (just in case you want to see
what the port assumed).

If you want to configure ports (with than ncurses blues screen)
sometimes and assume defaults in other cases perhaps you should try
portupgrade -m BATCH=yes package on a need basis.

As David suggested you can always do make config-recursive install
clean, to answer all the option questions before the port builds.

Warmly,
Javier


On 30/06/06 David J Brooks said:

If you  do 'make -DBATCH' instead of 'make' -  you will use the preset
defaults for each port with options. Or you can do
'make config-recursive' - which will offer you all the option screens for
the port in whose directory you're currently in and all its dependencies.

See 'man ports' for more information.

To use those with 'portupgrade -a' will probably take some custom scripting.


Ah, so there's no make.conf option for this?

Thanks,
Mike

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


Re: batching port builds

2006-07-01 Thread backyard1454-bsd


--- Javier Echaiz [EMAIL PROTECTED] wrote:

 You can put BATCH=yes in your /etc/make.conf
 
 The settings for each port (if it has something to
 config) are stored
 in /var/db/ports/{port dir name}/options (just in
 case you want to see
 what the port assumed).
 
 If you want to configure ports (with than ncurses
 blues screen)
 sometimes and assume defaults in other cases perhaps
 you should try
 portupgrade -m BATCH=yes package on a need basis.
 
 As David suggested you can always do make
 config-recursive install
 clean, to answer all the option questions before
 the port builds.
 
 Warmly,
 Javier
 
 On 30/06/06 David J Brooks said:
 
  If you  do 'make -DBATCH' instead of 'make' - 
 you will use the preset
  defaults for each port with options. Or you can
 do
  'make config-recursive' - which will offer you
 all the option screens for
  the port in whose directory you're currently in
 and all its dependencies.
 
  See 'man ports' for more information.
 
  To use those with 'portupgrade -a' will probably
 take some custom scripting.
 
 Ah, so there's no make.conf option for this?
 
 Thanks,
 Mike
 ___
 freebsd-questions@freebsd.org mailing list

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

the most convenient way to batch build ports is to use
this sort of if statements in make.conf

.if ${.CURDIR:M*/databases/mysql*}
BUILD_STATIC=yes
BUILD_OPTIMIZED=yes
WITH_LINUXTHREADS=yes
.endif

#reference
#http://blog.innerewut.de/articles/2006/01/14/upgrading-ports-and-preserve-make-options

this will work with portupgrade even in dependancies
because the port will always look to make.conf for
default system settings.

so


.if ${.CURDIR:M*/foo/bar}
BATCH=yes
WITH_THISOPTION=yes
WITHOUT_2NDOPTION=yes
.endif

will build with and without those options. just
remember to prefix the OPTIONS in a menu config setup
with WITH or WITHOUT to enable/disable what you want.
Always make sure to remember WITH_FOO=no means
WITH_FOO=yes, it should be
WITHOUT_FOO=whatever_it_is_now_set. The good thing is
individually you can choose to use one setting over
the other, and this also ensures one ports options
don't mess things up in another ones build. I know
when I was blindly setting build options in make.conf
weird problems began to arrise until I got errors
about make.conf being too large.

this can make make.conf get large so I've been meaning
to move the port configs into port.conf instead and
reference it in like


.if ${.CURDIR:M*/usr/ports/*}
include /foo/port.conf
.endif

I believe this is the correct syntax but I haven't
tried it yet. This method is how I am batch building
my servers. Ultimately I will make a Makefile to build
what I need and let it do its thing. 

I wish this method was documented better. Although it
is trivially simple if one understands makefiles so I
can see why its not really discussed. It is none the
less very effective and simple.

What I would like to know is if there is a simple way
to get the build options for every port in the
collection so it can easily be brought into a
port.conf file simply. I know I saw a command that
would parse the makefiles of all the ports and do
something to that effect but I can't recall it.

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


batching port builds

2006-06-30 Thread Michael P. Soulier
Apologies if this is in a FAQ, I didn't see it.

How does one tell the ports system to not query interactively for input, and
just take default build options, or a predefined set of options? Running a
portupgrade -a and finding the night wasted while the box sat waiting for
input is no fun at all.

Thanks,
Mike

-- 
Michael P. Soulier [EMAIL PROTECTED]
Any intelligent fool can make things bigger and more complex... It
takes a touch of genius - and a lot of courage to move in the opposite
direction. --Albert Einstein


pgpNLKZXSOAqN.pgp
Description: PGP signature


Re: batching port builds

2006-06-30 Thread David J Brooks
On Friday 30 June 2006 11:10, Michael P. Soulier wrote:
 Apologies if this is in a FAQ, I didn't see it.

 How does one tell the ports system to not query interactively for input,
 and just take default build options, or a predefined set of options?
 Running a portupgrade -a and finding the night wasted while the box sat
 waiting for input is no fun at all.

If you  do 'make -DBATCH' instead of 'make' -  you will use the preset 
defaults for each port with options. Or you can do 
'make config-recursive' - which will offer you all the option screens for 
the port in whose directory you're currently in and all its dependencies.

See 'man ports' for more information.

To use those with 'portupgrade -a' will probably take some custom scripting.

David
-- 
Sure God created the world in only six days,
but He didn't have an established user-base.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: batching port builds

2006-06-30 Thread Michael P. Soulier
On 30/06/06 David J Brooks said:

 If you  do 'make -DBATCH' instead of 'make' -  you will use the preset 
 defaults for each port with options. Or you can do 
 'make config-recursive' - which will offer you all the option screens for 
 the port in whose directory you're currently in and all its dependencies.
 
 See 'man ports' for more information.
 
 To use those with 'portupgrade -a' will probably take some custom scripting.

Ah, so there's no make.conf option for this?

Thanks,
Mike

-- 
Michael P. Soulier [EMAIL PROTECTED]
Any intelligent fool can make things bigger and more complex... It
takes a touch of genius - and a lot of courage to move in the opposite
direction. --Albert Einstein


pgp1DNyvYhcR4.pgp
Description: PGP signature


Re: batching port builds

2006-06-30 Thread Kevin Kinsey

Michael P. Soulier wrote:

On 30/06/06 David J Brooks said:

If you  do 'make -DBATCH' instead of 'make' -  you will use the preset 
defaults for each port with options. Or you can do 
'make config-recursive' - which will offer you all the option screens for 
the port in whose directory you're currently in and all its dependencies.


See 'man ports' for more information.

To use those with 'portupgrade -a' will probably take some custom scripting.


Ah, so there's no make.conf option for this?



??  You can even set BATCH=yes in your environment.  I'm
pretty sure you can in make.conf, also, but IIRC you might
not want to do that . . .

Kevin Kinsey
--
What the large print giveth, the small print taketh away.

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


Re: batching port builds

2006-06-30 Thread Kevin Kinsey

Michael P. Soulier wrote:

On 30/06/06 David J Brooks said:

If you  do 'make -DBATCH' instead of 'make' -  you will use the preset 
defaults for each port with options. Or you can do 
'make config-recursive' - which will offer you all the option screens for 
the port in whose directory you're currently in and all its dependencies.


See 'man ports' for more information.

To use those with 'portupgrade -a' will probably take some custom scripting.


Ah, so there's no make.conf option for this?



??  You can even set BATCH=yes in your environment.  I'm
pretty sure you can in make.conf, also, but IIRC you might
not want to do that . . .

Kevin Kinsey
--
What the large print giveth, the small print taketh away.

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


Re: batching port builds

2006-06-30 Thread David J Brooks
On Friday 30 June 2006 13:25, Michael P. Soulier wrote:
 On 30/06/06 David J Brooks said:
  If you  do 'make -DBATCH' instead of 'make' -  you will use the preset
  defaults for each port with options. Or you can do
  'make config-recursive' - which will offer you all the option screens for
  the port in whose directory you're currently in and all its dependencies.
 
  See 'man ports' for more information.
 
  To use those with 'portupgrade -a' will probably take some custom
  scripting.

 Ah, so there's no make.conf option for this?

If there is, I'm unaware of it. Then again, I rarely use 'portupgrade -a' 
myself. I start with 'portversion -v -l ' and work my way down the list 
interactively. It's more time consuming, but I tend to learn things along the 
way. :)

David
-- 
Sure God created the world in only six days,
but He didn't have an established user-base.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: batching port builds

2006-06-30 Thread Gerard Seibert
Michael P. Soulier wrote:

 On 30/06/06 David J Brooks said:
 
  If you  do 'make -DBATCH' instead of 'make' -  you will use the preset 
  defaults for each port with options. Or you can do 
  'make config-recursive' - which will offer you all the option screens for 
  the port in whose directory you're currently in and all its dependencies.
  
  See 'man ports' for more information.
  
  To use those with 'portupgrade -a' will probably take some custom scripting.
 
 Ah, so there's no make.conf option for this?

I have: BATCH= yes in my /etc/make.conf file and it works fine. Of
course I either build the port directly or use portmanager to do it so it
may not work with portupgrade, although I fail to see why it would not.


-- 
Gerard Seibert
[EMAIL PROTECTED]


I think it's wrong that only one company makes Monopoly.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: batching port builds

2006-06-30 Thread RW
On Saturday 01 July 2006 00:44, Gerard Seibert wrote:
 Michael P. Soulier wrote:
  On 30/06/06 David J Brooks said:
   If you  do 'make -DBATCH' instead of 'make' -  you will use the preset
   defaults for each port with options. Or you can do
   'make config-recursive' - which will offer you all the option screens
   for the port in whose directory you're currently in and all its
   dependencies.
  
   See 'man ports' for more information.
  
   To use those with 'portupgrade -a' will probably take some custom
   scripting.
 
  Ah, so there's no make.conf option for this?

 I have: BATCH= yes in my /etc/make.conf file and it works fine. 

It works  better in the envronment, than in /etc/make.conf. Some deinstall 
scripts prompt for input, and pkg_delete doesn't read make.conf.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: batching port builds

2006-06-30 Thread RW
On Friday 30 June 2006 17:31, David J Brooks wrote:
 On Friday 30 June 2006 11:10, Michael P. Soulier wrote:
  Apologies if this is in a FAQ, I didn't see it.
 
  How does one tell the ports system to not query interactively for input,
  and just take default build options, or a predefined set of options?
  Running a portupgrade -a and finding the night wasted while the box sat
  waiting for input is no fun at all.

 If you  do 'make -DBATCH' instead of 'make' -  you will use the preset
 defaults for each port with options. Or you can do
 'make config-recursive' - which will offer you all the option screens for
 the port in whose directory you're currently in and all its dependencies.

 See 'man ports' for more information.

 To use those with 'portupgrade -a' will probably take some custom
 scripting.

 David

This is what I use:
---
#!/bin/sh
plist=`pkg_version -ovl'' |awk '{ print $1 }'`
for porg in $plist ; do
cd  /usr/ports/${porg}  make config-recursive
done
---

not pretty, but it works for me. 

[Note: I use pkg_version, because neither pkg_version nor portmanager are 
bothered by package database inconsistencies. portupgrade and portversion 
both require full consistency so you may as well take advantage of 
portversion's speed.]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]