From owner-freebsd-arch@FreeBSD.ORG Wed May 2 12:31:54 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 411B11065673 for ; Wed, 2 May 2012 12:31:54 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C35B08FC0A; Wed, 2 May 2012 12:31:53 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q42CVrvh001106; Wed, 2 May 2012 12:31:53 GMT (envelope-from bapt@freebsd.org) Received: (from bapt@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q42CVra7001074; Wed, 2 May 2012 12:31:53 GMT (envelope-from bapt@freebsd.org) X-Authentication-Warning: freefall.freebsd.org: bapt set sender to bapt@freebsd.org using -f Date: Wed, 2 May 2012 14:31:49 +0200 From: Baptiste Daroussin To: Luigi Rizzo Message-ID: <20120502123149.GI31034@azathoth.lan> References: <20120502114115.GG31034@azathoth.lan> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HkMjoL2LAeBLhbFV" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) 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:31:54 -0000 --HkMjoL2LAeBLhbFV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 02, 2012 at 02:26:36PM +0200, Luigi Rizzo wrote: > On Wed, May 2, 2012 at 1:41 PM, Baptiste Daroussin wro= te: >=20 > > 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 i= f 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 clean= er > > 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 > > >=20 > just curious, where do we have the bdb 1.85 routines now ? > Are they all in libc, or split between libc and libutil ? All in libc regards, Bapt --HkMjoL2LAeBLhbFV Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk+hKTUACgkQ8kTtMUmk6EwidACdHUCm8psv/aqDEWgzcPYyZDRI YG8AoIbPnB9sJeXDPx8r0SpJLoDs+OlT =LQQX -----END PGP SIGNATURE----- --HkMjoL2LAeBLhbFV--