Date: Thu, 12 Jun 2003 15:47:09 -0400 From: Eric W.Bates <ericx@vineyard.net> To: Andrew Thompson <andy@fud.org.nz>, Patrik Forsberg <patrik.forsberg@dataphone.net> Cc: freebsd-isp@freebsd.org Subject: Re: Updating Ports on Production Servers Message-ID: <20030612194709.A8F9F91F68@vineyard.net>
next in thread | raw e-mail | index | archive | help
If you feel you have to avoid portupgrade (it's a wonderful tool, but it doesn't work on new machines until you have built it), you can create a /usr/ports/../Makefile.inc and have it include your own make.conf. It would seem that using /usr/ports/Makefile.local would be a good way to do this; but it is only included during the pre-makefile period of the build and consequently, won't quite work if the flags you want to set have to be individual for each port (e.g. ${CONFIGURE_ARGS}). /usr/ports/../Makefile.inc is included during both the pre-makefile and post-makefile phases. Caveat: I have no idea why the ports gurus are including ${MASTERDIR}/../Makefile.inc in /usr/ports/Mk/bsd.port.mk; so I can't intelligently promise that this mechanism will continue to work. # -*- makefile -*- # $Id: Makefile.inc,v 1.2 2002/08/28 15:51:12 ericx Exp $ # # $Log: Makefile.inc,v $ # Revision 1.2 2002/08/28 15:51:12 ericx # Check-in for ASC # Also added comments and emacs directive # # Revision 1.1 2002/03/19 15:07:59 asc # Initial revision # # file is loaded up via what may be an oddity in the Mk configuration # files in /usr/ports/Mk/bsd.port.mk AFTER all the variables are set # in the various Makefiles. Unlike /etc/make.conf, this gives an # opportunity to override settings in port Makefiles. # This requires a flag be set in /etc/make.conf .if defined(VNIAFTERPORTMK) && ${VNIAFTERPORTMK} == YES .if exists(/etc/make.conf.vni) # But if the flag is set, and the file exists, pull it in. .include </etc/make.conf.vni> .endif .undef VNIAFTERPORTMK .endif # -*- makefile -*- # File: make.conf.vni # Author: Charlie Root, ericx@vineyard.net # Date: Thu Jan 3 00:34:51 2002 # Time-stamp: <2003-05-18 10:44:51 ericx> # Description: Setting variable in /etc/make.conf is not optimal # because those variables are read very early in the # compilation process and anything can be overridden in # the various Makefiles embedded in the ports # system. Nor can variables in /etc/make.conf be set on # a per-port basis, because at the time it is read # ${PORTNAME} has not been set. # # This file is read in at the END of make's parsing phase # after all other Makefiles have been # included. Conditional variables can be can be set # based on ${PORTNAME} and decisions made by the port's # maintainer can be overridden. # # See also: /etc/make.conf, /usr/Makfile.inc, /usr/ports/Mk # # # $Id: make.conf.vni,v 1.11 2003/05/18 14:56:07 ericx Exp $ # $Log: make.conf.vni,v $ # Revision 1.11 2003/05/18 14:56:07 ericx # Removed redundant php4 entry. # Adjusted php4 entry to use port's configure mechanism. # Removed OpenLDAP2 option because it causes httpd to core dump. No # idea why. # # Revision 1.10 2003/05/14 18:50:04 ericx # Please be careful. This makefile is NOT exclusive to the ports tree; # but is used system wide by all compiles including buildworld. # # Patched conditionals for mod_php4 and imp3 so they won't barf for # non-ports compiles. # # Revision 1.9 2003/04/23 14:56:22 asc # Added bugzilla entry. # # Revision 1.8 2003/04/18 16:04:18 theqblas # Added imp3 flags # # Revision 1.7 2003/04/18 16:02:44 theqblas # Added mod_php4 configure args. # .if defined(VNIAFTERPORTMK) HOSTNAME?= /bin/hostname .if defined(PORTNAME) && ${PORTNAME} == perl # Per the INSTALL docs this needs to be a colon-separated # list of paths. If someone else knows how to do that spanning # multiple lines, please go nuts. # Note we are only including the site_perl directories to # try and prevent any weirdness with the core libraries. # Note also that we are *not* including the ${PERL_ARCH} # directory which gets automagically included. Dunno. CONFIGURE_ARGS+= -Dotherlibdirs=${PREFIX}/lib/perl5/site_perl/5.005 .endif # End of perl port configs .if defined(PORTNAME) && ${PORTNAME} == bugzilla # Need to find some way to patch the default # patch for checksetup.pl to set webservergroup # as 'http'. I don't know how to do this; there # is an entry in bugzilla... .endif # End of 'bugzilla' .if defined(PORTNAME) && ${PORTNAME} == apache+mod_ssl # We disable the use of apache's built-in expat-lite because it makes # using anything that uses the XML::Parser package in a mod_perl # context impossible. CONFIGURE_ARGS+= --disable-rule=EXPAT .endif # End of apache+mod_ssl port configs .if defined(PORTNAME) && ${PORTNAME} == mod_dav CONFIGURE_ARGS+= --with-expat=/usr/local .endif # End of mod_dav .if defined(PORTNAME) && ${PORTNAME} == mod_php4 # This is to preempt the interactive menu normally used by the php # port. # The mod_php4 port uses PHP4_OPTIONS to set a number of compile # options (including dependencies). Only setting CONFIGURE_ARGS for # these skips the dependencies and other make linkages; so unless you # want to look them all up and do them by hand too, just set # PHP4_OPTIONS above. The code that runs all this is found in # /usr/ports/www/mod_php4/scripts/configure.php. No, I don't really # grok the need for the escaped quotes... SCRIPTS_ENV+= BATCH=yes # as of mod_php4 4.3.1, the compile with openldap 2.0 builds ok; but # the resultant httpd won't run (no errors; just a core) PHP4_OPTIONS= \ \"zlib\" \ \"mcrypt\" \ \"IMAP\" \ \"IMAP-SSL\" \ \"MySQL\" \ \"OpenSSL\" \ \"XML\" \ \"DOMXML\" \ \"FTP\" \ \"gettext\" \ \"MCAL\" # \"OpenLDAP2\" \ CONFIGURE_ARGS+= \ --enable-memory-limit \ --enable-safe-mode # mod_php4 .endif ## IMP flags .if defined(PORTNAME) && ${PORTNAME} == imp3 # Don't require an IMAP server to exist on this machine WITHOUT_IMAPSERVER=yes # imp3 .endif .if defined(PKGNAMEPREFIX) && ${PKGNAMEPREFIX} == p5- # this is a context for (hopefully) all perl5 modules MAKE_ARGS+= UNINST=1 #.error the var = ${CONFIGURE_ENV} .endif # p5- modules .endif # End of VNIAFTERPORTMK ----- Original Message ----- From: "Andrew Thompson" <andy@fud.org.nz> To: "Patrik Forsberg" <patrik.forsberg@dataphone.net> Cc: <freebsd-isp@freebsd.org>; "Support" <support@netmint.com> Sent: Tuesday, June 10, 2003 2:34 AM Subject: RE: Updating Ports on Production Servers > On Tue, 2003-06-10 at 18:15, Patrik Forsberg wrote: > > > > What a "make deinstall" aculy does is a pkg_delete, so what you could do > > is a pkg_delete <old-package-name> and then "make install" the new > > package. > > > > The bad part about using portupgrade is that you can't specify any > > "special" make parameters if you use any - perhaps I haven't dug deap > > enough into portupgrade to find out how but from what I've seen you > > can't. So if you use any make params to the port I'd surgest doing a > > "pkg_delete <port-name>" and then "make install" it rather then using > > portupgrade. > > > > Oh, you are quite mistaken. make args are one of its strong points :) > > Firstly you can use -m on the command line. But even better is > pkgtools.conf where you can store the parameters permanently, no need to > remember them or retype next time you upgrade. > > Here is a snippet from mine: > MAKE_ARGS = { > 'www/mozilla' => '-DWITH_GTK2' > } > > > Andy >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030612194709.A8F9F91F68>