From owner-freebsd-ports@FreeBSD.ORG Thu Nov 20 22:50:26 2008 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11D4B1065675; Thu, 20 Nov 2008 22:50:26 +0000 (UTC) (envelope-from marcus@riboflavin.net) Received: from dsl.76.226.networkiowa.com (dsl.76.226.networkiowa.com [209.234.76.226]) by mx1.freebsd.org (Postfix) with ESMTP id A0F1A8FC17; Thu, 20 Nov 2008 22:50:25 +0000 (UTC) (envelope-from marcus@riboflavin.net) Received: by dsl.76.226.networkiowa.com (Postfix, from userid 1004) id AA54095892; Thu, 20 Nov 2008 16:33:41 -0600 (CST) X-Spam-Score: 11.2 X-Spam-Flag: YES X-Spam-Checker-Version: SpamAssassin 3.2.5(2008-06-10) on dsl.76.226.networkiowa.com X-Spam-Level: xxxxxxxxxxx X-Spam-Status: Yes, hits=11.2 required=8.0 tests=ALL_TRUSTED,AWL,BAYES_99, MIME_QP_LONG_LINE autolearn=no version=3.2.5 X-Spam-Report: * -1.8 ALL_TRUSTED Passed through trusted hosts only via SMTP * 12 BAYES_99 BODY: Bayesian spam probability is 99 to 100% * [score: 1.0000] * 1.4 MIME_QP_LONG_LINE RAW: Quoted-printable line longer than 76 chars * -0.4 AWL AWL: From: address is in the auto white-list Received: from localhost (localhost.networkiowa.com [127.0.0.1]) by dsl.76.226.networkiowa.com (Postfix) with ESMTP id 9138095859; Thu, 20 Nov 2008 16:33:30 -0600 (CST) Received: from dsl.76.226.networkiowa.com (dsl.76.226.networkiowa.com [209.234.76.226]) by www.riboflavin.net (Horde Framework) with HTTP; Thu, 20 Nov 2008 16:33:30 -0600 Message-ID: <20081120163330.amssmoq1c8ksskg0@www.riboflavin.net> X-Priority: 3 (Normal) Date: Thu, 20 Nov 2008 16:33:30 -0600 From: "Marcus I. Ryan" To: freebsd-questions , freebsd-ports@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.2-cvs) Cc: Subject: Jails and common ports X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Nov 2008 22:50:26 -0000 Cross-posting this to freebsd-ports because it's mostly about the =20 ports infrastructure and how I might (ab)use it... I'm looking into setting up jails, and was hoping I was onto something =20 with using ports to maintain application software but I hit a snag and =20 I'm hoping someone can either tell me how to do what I want or at =20 least say "nope...you're on crack thinking that will work" ;) I'm trying to set up a number of jails on my system following the =20 handbook suggestions for "Application of Jails" =20 (http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/jails-application= .html). That means I have a master read-only instance for the base system (= world), and read-write instances of key directories for each jail. This is = ideal for what I'd like to do because I only have to do one world upgrade to= upgrade all my =20 jails. I'd like to extend that idea to a number of common ports. For =20 instance, I'd like to have gettext, libtool, etc., installed once and =20 be able to do a single portupgrade to update it for all jails. My initial plan was to make an /opt folder in the master filesystem =20 and use the master jail to install ports (PREFIX=3D/opt and =20 LOCALBASE=3D/opt). I added the /opt/bin and /opt/sbin to the path and =20 /opt/lib to the ld_config directories for the child jails and they =20 were indeed able to see the first couple of ports I installed. However, I started hitting issues with libtool and friends. The =20 children would not find them, and would go ahead and start installing =20 their own local copies of those ports. Turns out quite a few tools =20 are defined in /usr/ports/Mk/* and are defined relative to LOCALBASE. =20 If I leave LOCALBASE and PREFIX alone in the child jails so they'll =20 use /usr/local for their specific ports, I can't recognize and use =20 other ports like libtool installed in /opt; it doesn't seem right to =20 set LOCALBASE in the child jails since I want them to use /usr/local =20 for anything I haven't provided. I really would like to avoid the "joy" of making hard-links, etc., for =20 all the files in the common packages, but I didn't see any way to =20 override settings for these individual ports. I did edit some =20 Makefiles and add '--prefix=3D/opt' to the CONFIGURE_ARGS for those =20 ports, and everything worked fine, but I'd prefer to do it "the right =20 way" (e.g. not editing Makefiles). Is there a variable I'm not seeing that would allow me to do this kind =20 of crazy thing, or am I better off either setting up hard links and/or =20 using automated package building and just repeating pkg_upgrades in =20 each jail? If it's the latter, does someone know of a decent all-in-one doc to =20 help me at least set up some features so I update ports once in a =20 master and just get packages from the same place (I can piece it =20 together myself from all the other docs I've found and been reading, =20 but if someone has already written it up, hate to reinvent it myself =20 :) ). Thanks in advance. --=20 Marcus I. Ryan, marcus@riboflavin.net ------------------------------------------ People often find it easier to be a result of the past than a cause of the future. ------------------------------------------