From owner-freebsd-questions@FreeBSD.ORG Tue Mar 13 02:39:24 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B83C016A401 for ; Tue, 13 Mar 2007 02:39:24 +0000 (UTC) (envelope-from bsd-unix@earthlink.net) Received: from pop-knobcone.atl.sa.earthlink.net (pop-knobcone.atl.sa.earthlink.net [207.69.195.64]) by mx1.freebsd.org (Postfix) with ESMTP id 9926813C44C for ; Tue, 13 Mar 2007 02:39:24 +0000 (UTC) (envelope-from bsd-unix@earthlink.net) Received: from fl-76-3-168-71.dhcp.embarqhsd.net ([76.3.168.71] helo=kt.weeeble.com) by pop-knobcone.atl.sa.earthlink.net with smtp (Exim 3.36 #1) id 1HQwv2-0005KP-00; Mon, 12 Mar 2007 22:39:20 -0400 Date: Mon, 12 Mar 2007 22:39:20 -0400 From: Randy Pratt To: Parv Message-Id: <20070312223920.1a7a4629.bsd-unix@earthlink.net> In-Reply-To: <20070313001520.GA7158@holestein.holy.cow> References: <042d01c76476$b226bc30$16743490$@net> <20070313001520.GA7158@holestein.holy.cow> X-Mailer: Sylpheed 2.3.1 (GTK+ 2.10.9; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org, Alexander Schlichting Subject: Re: Recover Make ARG's from a ports Install X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2007 02:39:24 -0000 On Mon, 12 Mar 2007 20:15:20 -0400 Parv wrote: > in message <042d01c76476$b226bc30$16743490$@net>, > wrote Alexander Schlichting thusly... > > > > On a server I have a package installed using ports and now I have > > to install the package with exactly the same make arguments on > > another server. I just don't find a way to see what arguments > > where used to install it the first time. With Linux I would look > > into config.status is there something similar with FreeBSD? > > There may be config.status present in $WRKSRC directory (in a port > directory, run "make -V WRKSRC" to find the value) if that port's > make process generates such a file AND you have not run "make clean" > yet. (That also means you have to compile the port yourself.) > > To save make arguments for future use, you could write a wrapper > which would save the arguments in a file|database before running > appropriate make target. Use the same wrapper to retrieve the > stored arguments. > > Below is my attempt at such a wrapper (feel free to change) ... > > http://www103.pair.com/parv/comp/src/sh/pmk > > > ... to see available commands just run "pmk" without any arguments. > Provide arguments to a make target as ... > > pmk [ arg_1 arg_2 arg_3 ... ] There is already a mechanism in place for this: /usr/local/etc/pkgtools.conf See man 5 pkgtools.conf for a full description. It has the advantage that portupgrade will use the contents of that file when updating to new versions so that your settings are not lost. Make arguments as well as a variety of other options for installing and updating ports can reside there. Typically, I use this if there are no OPTIONS (ie, "make config") settings available and I need to use non-default options. The only difference is that you would use "portupgrade -N ..." or portinstall to install new ports rather than "make install". See the man pages for further information. HTH, Randy --