From owner-freebsd-questions Fri Jan 19 20:52:15 2001 Delivered-To: freebsd-questions@freebsd.org Received: from thelab.hub.org (SHW2-220.accesscable.net [24.71.145.220]) by hub.freebsd.org (Postfix) with ESMTP id BBDF837B6AC for ; Fri, 19 Jan 2001 20:51:53 -0800 (PST) Received: from localhost (scrappy@localhost) by thelab.hub.org (8.11.1/8.11.1) with ESMTP id f0K4o3N10459; Sat, 20 Jan 2001 00:50:03 -0400 (AST) (envelope-from scrappy@hub.org) X-Authentication-Warning: thelab.hub.org: scrappy owned process doing -bs Date: Sat, 20 Jan 2001 00:50:03 -0400 (AST) From: The Hermit Hacker To: "David J. MacKenzie" Cc: , Subject: Re: fastresolve 2.8 with DB_File / Berkeley DB3 ... In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG just got convert-ip-db to work: search-n-replace DB_File with BerkeleyDB and change the tie function to: tie(%input, "BerkeleyDB::Btree", -Filename => $dbfile) || die "$0: Can't read $dbfile: $!\n"; and she works ... On Sat, 20 Jan 2001, The Hermit Hacker wrote: > On Fri, 19 Jan 2001, David J. MacKenzie wrote: > > > You do need to have a perl DB_File module linked against the > > same version of Berkeley DB that the C program dns-terror > > is using. At our site, by default DB_File is linked against > > DB 2.x, but we wanted to access old DB 1.x files from perl > > also. So we made a DB1_File module by copying the sources > > to DB_File and renaming the files and doing a search and > > replace. And of course we compile and link it against the > > desired version of DB. You could do the same to make a DB3_File > > module. > > > > It is kind of odd that perl doesn't come with this ability. > > Hadn't thought of that, but with your suggestions, just tried it, and am > getting the same results after makign sure that convert-ip-db to use > DB3_File ... but I'm guessing that might have to do with header files, as > when i make it load the proper includes, the DB_File won't even build, as > its missing defines ... > > but, it turns out there is a BerkeleyDB perl interface ... what is the > chances of moving fastresolve over to that? > > NAME > BerkeleyDB - Perl extension for Berkeley DB version 2 or 3 > > I just tried a simple search and replace in convert-ip-db, and it results > in: > > thelab# convert-ip-db > Can't locate auto/BerkeleyDB/TIEHASH.al in @INC (@INC contains: /usr/libdata/perl/5.6.0/mach /usr/libdata/perl/5.6.0 /usr/local/lib/perl5/site_perl/5.6.0/mach /usr/local/lib/perl5/site_perl/5.6.0 /usr/local/lib/perl5/site_perl/5.6.0 .) at /usr/local/bin/convert-ip-db line 48 > > so it obviously doesn't work "out of the box" ... > > > Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy > Systems Administrator @ hub.org > primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy Systems Administrator @ hub.org primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message