From owner-freebsd-ports@FreeBSD.ORG Sat Nov 4 02:10:01 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 7367716A40F for ; Sat, 4 Nov 2006 02:10:01 +0000 (UTC) (envelope-from o_sleep@belovedarctos.com) Received: from chipotle.belovedarctos.com (mail.belovedarctos.com [66.114.86.142]) by mx1.FreeBSD.org (Postfix) with ESMTP id EFBD443D55 for ; Sat, 4 Nov 2006 02:10:00 +0000 (GMT) (envelope-from o_sleep@belovedarctos.com) Received: from [10.0.1.99] (unknown [10.0.1.99]) by chipotle.belovedarctos.com (Postfix) with ESMTP id 0C9D82E01F; Sat, 4 Nov 2006 02:10:00 +0000 (UTC) In-Reply-To: References: Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <0EA4590E-D2F5-4990-82C2-9CC77B3CAED3@belovedarctos.com> Content-Transfer-Encoding: 7bit From: Bjorn Nelson Date: Fri, 3 Nov 2006 21:09:59 -0500 To: Charles Sprickman X-Mailer: Apple Mail (2.752.3) Cc: freebsd-ports@freebsd.org Subject: Re: [nycbug-talk] 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: Sat, 04 Nov 2006 02:10:01 -0000 Charles, On Nov 3, 2006, at 3:30 PM, Charles Sprickman wrote: > 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 I hate to keep referring to my article but I go over this here: http://www.onlamp.com/pub/a/bsd/2006/04/13/freebsd-build-system.html? page=2 Basically, you can create a port with this in the Makefile: CATEGORIES=local VALID_CATEGORIES+= ${CATEGORIES} I have an example port here: http://www.onlamp.com/bsd/2006/04/13/examples/Makefile Thanks goes to freebsd-ports.freebsd.org for this tip actually (which is where I originally found out about it). > > We might occasionally look at the real qmail/mailfront/djbdns or > other ports and see if there's anything we want to pull in, but > we'd most likely be doing more work with merging in more of our own > patches/software. > > 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. > > 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. How can this > be dealt with in a way that none of the current/future port update > methods will not clobber our local tree? Add "local" to /usr/ports/.cvsignore > -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? Not sure how to handle this one. You may need to just either make dependent packages or patch the Makefiles after you do a cvsup. Besides that, cool tip about the patches being able to put in the files dir and the bsd.local.mk file. -Bjorn