From owner-freebsd-ports@FreeBSD.ORG Fri Nov 3 21:10:22 2006 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2AB9616A4DA for ; Fri, 3 Nov 2006 21:10:22 +0000 (UTC) (envelope-from freebsd-ports-local@be-well.ilk.org) Received: from mail8.sea5.speakeasy.net (mail8.sea5.speakeasy.net [69.17.117.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3267D43D82 for ; Fri, 3 Nov 2006 21:10:21 +0000 (GMT) (envelope-from freebsd-ports-local@be-well.ilk.org) Received: (qmail 13852 invoked from network); 3 Nov 2006 21:10:20 -0000 Received: from dsl092-078-145.bos1.dsl.speakeasy.net (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail8.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 3 Nov 2006 21:10:20 -0000 Received: by be-well.ilk.org (Postfix, from userid 1147) id C39F928432; Fri, 3 Nov 2006 16:10:19 -0500 (EST) To: Charles Sprickman References: From: Lowell Gilbert Date: Fri, 03 Nov 2006 16:10:19 -0500 In-Reply-To: (Charles Sprickman's message of "Fri, 3 Nov 2006 15:30:47 -0500 (EST)") Message-ID: <44irhwme2s.fsf@be-well.ilk.org> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-ports@freebsd.org Subject: Re: creating "local" ports (fwd) 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: Fri, 03 Nov 2006 21:10:22 -0000 You've got a bunch of misconceptions. In this case, that turns out to be good, because the solutions are a lot simpler than you think. Charles Sprickman writes: > Hello all, > > I'm finding that there are a number of ports that we need to patch for > some functionality that's unique to our business (qmail, mailfront, > etc.). Currently we just do "make patch" and then apply our patches. > This works, but is a bit of a pain to maintain. > > Is there a way to create a "local" category? ie: /usr/ports/LOCAL Yes, you can look at category creation in the porters' handbook, but there is an easier approach: just put your own patches in the files directory of the port. This lets you take advantage of changes to the official port. > Is there some mechanism that I'm missing to deal with a local > category? I've been googling without much luck, and I didn't see this > addressed in the porter's handbook. See /usr/ports/Mk/bsd.local.mk; it is the hook that will let you do your category customization without needing to actually modify any official files. > Beyond that, I have a few other questions: > > -By default cvsup and (I assume portsnap) would nuke anything in > /usr/ports that was not part of the main ports tree. Not true. cvsup will only touch files that it thinks *it* originally put in the tree. I haven't used portsnap, but it looks as though the same applies. Therefore... > How can this be > dealt with in a way that none of the current/future port update > methods will not clobber our local tree? it's not a problem. > -How does one handle packages that depend on say, qmail, but I now want to > depend on local-qmail? I know portupgrade can be tought this by setting > an alternate pkgdep, but is there any clever way of doing this so that > when you're not using portupgrade the deps are adjusted? I don't know a way to do exactly this. My advice would be to finesse the problem: either by using portupgrade, or by using the "real" port (e.g., qmail rather than local-qmail) with your own patches, as I explained earlier. I hope that helps.