From owner-freebsd-ports@FreeBSD.ORG Wed Mar 16 14:16:34 2005 Return-Path: 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 334C816A4CE for ; Wed, 16 Mar 2005 14:16:34 +0000 (GMT) Received: from melon.pingpong.net (82.milagro.bahnhof.net [195.178.168.82]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1DC4A43D39 for ; Wed, 16 Mar 2005 14:16:33 +0000 (GMT) (envelope-from girgen@FreeBSD.org) Received: from localhost (localhost.pingpong.net [127.0.0.1]) by melon.pingpong.net (Postfix) with ESMTP id 71FD14B007; Wed, 16 Mar 2005 15:16:31 +0100 (CET) Received: from melon.pingpong.net ([127.0.0.1]) by localhost (melon.pingpong.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 67194-01-4; Wed, 16 Mar 2005 15:16:31 +0100 (CET) Received: from [192.168.1.187] (81.milagro.bahnhof.net [195.178.168.81]) by melon.pingpong.net (Postfix) with ESMTP id 328624B005; Wed, 16 Mar 2005 15:16:30 +0100 (CET) Date: Wed, 16 Mar 2005 15:16:30 +0100 From: Palle Girgensohn To: John Nielsen Message-ID: In-Reply-To: <200503152238.33442.john@jnielsen.net> References: <200503152238.33442.john@jnielsen.net> X-Mailer: Mulberry/3.1.6 (Linux/x86) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: by amavisd-new at pingpong.net cc: ports@freebsd.org Subject: Re: FreeBSD port of CONNECT BY patch for pgsql X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Mar 2005 14:16:34 -0000 --On tisdag, mars 15, 2005 22.38.33 -0700 John Nielsen wrote: > All- > > I am interested in creating a FreeBSD port of PostgreSQL 8.0.1 that > incorporates the CONNECT BY patch found here: > > http://gppl.moonbone.ru > > I have successfully compiled and installed the modified postgres on my > system, and I'd like to save myself and others in the future the trouble > I went to. Before I proceed, I have a few questions. > > First, am I duplicating anyone else's effort? Not as far as I know. > Second, what would be the best approach in structuring the port? Mr. > Potemkin distributes his modifications as a single diff against the > postgres source tree. In addition to needing this file, the port will > also need to add devel/bison as a build dependency due to the way the > diff is built and applied (I didn't have bison installed, and had to > scratch my head for a while on that one). OK. Here I see a problem, we have to use a modern enough bison. It seems that detecting on ${LOCALBASE}/bin/bison-devel is enough? Are you sure that bison1875 won't work? It does work for unpatched postgresql sources. > The procedure I followed (and the one I'd like the port to emulate) was > this: > fetch (including patch) > extract > install FreeBSD patches from existing port (make patch) > install hier patchset > make > install > > I followed this procedure for both the client and the server, since they > are distinct FreeBSD ports (even though they are both built from the > same source tree). I would imagine that the patches are all for the server, though? Not that it matters much. It does modify some header files as well, though I wouldn't know if they are needed for anything outside the backend anyway. For reasons of simplicity, the client part of the port installs *all* headers... > Would it be possible to do all this as a slave port of the existing > postgresql80? Would it be better/easier to duplicate the existing port > and make changes on top of it? My suggestion is this: Add an option to the current postgresql80-server port (something like "use hier patch (EXPERIMENTAL)"). When this option is checked, add PATCH_SITES and PATCHFILES, and probably an extra PKGNAMESUFFIX hier. Also, add some blurbs to README files, and perhaps install en extra README for this (could be practical since it could be used to differentiate a standard pg install from a pg-hier install, in case some new port you create would need this functionality). Since the patch should probably be considered "experimental", there's really no need to have a port of its own, IMHO. It seems easier to just add an optional patch for the normal port? Maybe I'm wrong here? Potential problem is if the hier patchset is not updated fast enough when postgresql is updated. > What would be the best way to apply the patchset within the ports > framework? As written, the diff needs to be applied from the work > directory rather than the base of the source distribution directory, so > I can't just drop it in the port's files directory (can I?). patch takes the -p argument, use it with -p1 or perhaps -p2 will fix this. > Third, what's the protocol for updating the CONFLICTS of other affected > ports? I'm not sure I understand this question? Check porter's handbook, CONFLICTS takes normal shell wildcards. What other affected ports would conflict? > And finally, what would be a good naming convention? I've considered > postresql_hier-server with postgresql_hier80-server as the directory name. I'm not sure. Again, see if the Porter's handbook helps here. > Please CC me on replies, as I'm not subscribed to ports@. > > Thanks! > > John Nielsen Cheers, Palle