From owner-freebsd-arch@FreeBSD.ORG Wed May 2 12:26:38 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 63F4E1065670; Wed, 2 May 2012 12:26:38 +0000 (UTC) (envelope-from rizzo.unipi@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id C3C8C8FC0C; Wed, 2 May 2012 12:26:37 +0000 (UTC) Received: by eaaf13 with SMTP id f13so162987eaa.13 for ; Wed, 02 May 2012 05:26:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=hZgxJuengQ+m60X6d1eRbc3Y/pqfYF02/g0s8G5M204=; b=tqgLgcp2A0m1SPFTElsHFrYDedAEQ8ou4nQy+QJYKaUNA6aZ0EcOf0PnTlUCxrcKfI J/zIe0DrEwlIjh5sAYLzsbumyv8lNrpfiEkcYv04HAgZmICKDy18esK1Jxw4Eq8/aplu ljLRjBBoAVvDB6zYajwERsag3K2vZm6jjFJ+Pdse44Oz7sjaZ1xeHjfdU/AmUG/Al8DY 8gmmNbcveVWFjY8aTEciMs9FPfLi3eYCmT+Lg+r3q1efaNmBWLxdtNe9PiMjj8QIf1sO PzO65Wo45ONiXSFnmucd9PumDl5kcqMPJW2JAwJiaqulIBs1qmEE4TrHBBUWE6YAjXZx M3mA== MIME-Version: 1.0 Received: by 10.14.95.1 with SMTP id o1mr4987870eef.77.1335961596929; Wed, 02 May 2012 05:26:36 -0700 (PDT) Sender: rizzo.unipi@gmail.com Received: by 10.14.135.9 with HTTP; Wed, 2 May 2012 05:26:36 -0700 (PDT) In-Reply-To: <20120502114115.GG31034@azathoth.lan> References: <20120502114115.GG31034@azathoth.lan> Date: Wed, 2 May 2012 14:26:36 +0200 X-Google-Sender-Auth: 7gZ2QHW8Fmo6y-giqVTvFj3oeJM Message-ID: From: Luigi Rizzo To: Baptiste Daroussin Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-arch@freebsd.org Subject: Re: Switching /etc/*.db from bdb to tinycdb X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 May 2012 12:26:38 -0000 On Wed, May 2, 2012 at 1:41 PM, Baptiste Daroussin wrote: > Hi, > > I plan to work on switching all the /etc/*.db files from bdb 1.85 to cdb > (using > the tinycdb implementation) > > Reason for doing that: > 1/ we use the *.db files as a constant database on recreating them using > *_mkdb(8) commands > 2/ bdb 1.85 database are endianness dependant which can cause problem if I > want > pkgng to be able to create users when cross installing packages (like > adding > packages in a mips eb chroot environment on an amd64 host) > 3/ the tinycdb API is clean and easy to use (I find it easier and cleaner > to > deal with it) > 4/ tinycdb is public domain so not problem for us to use it. > > On the side effects, I'm not sure this is relevant but tinycdb is also > faster to > read then bdb 1.85. > > How do I plan to do it. > > I plan to import the read part or tinycdb into libc and the write part into > libutil (to avoid cluttering libc). > > Why importing to libc? to allow all the get*ent to parse the /etc/*.db > files > just curious, where do we have the bdb 1.85 routines now ? Are they all in libc, or split between libc and libutil ? cheers luigi