From owner-freebsd-ports@FreeBSD.ORG Thu Jun 7 18:19:56 2007 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 383A316A469 for ; Thu, 7 Jun 2007 18:19:56 +0000 (UTC) (envelope-from wxs@atarininja.org) Received: from syn.atarininja.org (syn.csh.rit.edu [129.21.60.158]) by mx1.freebsd.org (Postfix) with ESMTP id E7F2413C45A for ; Thu, 7 Jun 2007 18:19:55 +0000 (UTC) (envelope-from wxs@atarininja.org) Received: by syn.atarininja.org (Postfix, from userid 1001) id 283215C2E; Thu, 7 Jun 2007 14:04:17 -0400 (EDT) Date: Thu, 7 Jun 2007 14:04:17 -0400 From: Wesley Shields To: Paul Schmehl Message-ID: <20070607180417.GC47047@atarininja.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.15 (2007-04-06) Cc: FreeBSD Ports Subject: Re: An install conundrum 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, 07 Jun 2007 18:19:56 -0000 On Thu, Jun 07, 2007 at 11:15:17AM -0500, Paul Schmehl wrote: > I'm working on an update to security/bro, and I plan to take over > maintainership. However, I've run into a problem that I don't know how to > solve. > > By default this program installs everything in /usr/local/bro. This > includes the docs, the binaries, the libraries, includes, everything. I can > use configure args to define datadir, bindir, sysconfdir, libdir and > includedir, but that leaves the rest of the programs directories installing > in /usr/local. The program creates a number of directories, including > archive, logs, policy, reports, scripts, site and var. > > If I use the configure arg --prefix=${PREFIX}/bro, that solves the problem > of the "extra" dirs and files, but then it changes --prefix, and so the > bindir, etc. is now in the wrong place again. > > Has anyone run across this type of problem? If so, how do you solve it? I looked into this port a few months ago for an acquaintance. I eventually lost my work when I rm'ed the wrong jail (that will teach me to use more descriptive jail names), and never bothered to start it back up. I ran into the same problem and ended up patching the various Makefile.in to define the proper directories. As a quick example, take a look at policy/Makefile.in (this is for 1.1d). You will find: bropolicydir = ${prefix}/policy I was patching these things to be ${prefix}/share/bro/policy. There are a few other places you need to do similar things. This way you can define prefix to be ${PREFIX} and have the binaries be installed in ${PREFIX}/bin, libraries in ${PREFIX}/lib, etc. and still tweak the other things which want to install into ${PREFIX}/policy, ${PREFIX}/site, etc. to be in more appropriate places (most likely ${PREFIX}/share/bro/policy). Also, while I was looking into the port I noticed http://www.bro-ids.org/broccoli/index.html and thought I would make broccoli an optional thing. Turns out the configure script for bro doesn't like --disable-broccoli despite advertising the option. wxs@rst bro-1.1d > ./configure --disable-broccoli checking build system type... amd64-unknown-freebsd6.2 checking host system type... amd64-unknown-freebsd6.2 checking target system type... amd64-unknown-freebsd6.2 checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... no checking for mawk... no checking for nawk... nawk checking whether make sets $(MAKE)... yes checking for style of include used by make... GNU checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking dependency style of gcc... gcc3 checking for flex... flex checking for yywrap in -lfl... yes checking lex output file root... lex.yy checking whether yytext is a pointer... yes checking for bison... bison -y checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking dependency style of g++... gcc3 checking for a BSD-compatible install... /usr/bin/install -c checking whether make sets $(MAKE)... (cached) yes checking for gzip... gzip configure: error: unknown enable option: broccoli wxs@rst bro-1.1d > Good luck with this port, I know of at least one person who would like to see it updated. -- WXS