From owner-freebsd-arch@FreeBSD.ORG Wed May 2 11:41:19 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 6BF5B106566B for ; Wed, 2 May 2012 11:41:19 +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 527E08FC19 for ; Wed, 2 May 2012 11:41:19 +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 q42BfJ8E056105 for ; Wed, 2 May 2012 11:41:19 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q42BfJlW056104 for freebsd-arch@FreeBSD.org; Wed, 2 May 2012 11:41:19 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 13:41:15 +0200 From: Baptiste Daroussin To: freebsd-arch@FreeBSD.org Message-ID: <20120502114115.GG31034@azathoth.lan> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bO4vSxwwZtUjUWHo" Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Subject: 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 11:41:19 -0000 --bO4vSxwwZtUjUWHo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. How to implment it? slowly with backward compatibility: for each kind of files: try to open with cdb, if fail fall back to bdb. I plan to rewrite all the *_mkdb for make them use cdb. Link for tinycdb: http://www.corpit.ru/mjt/tinycdb.html Any opinion, ideas, advices on this? regards, Bapt --bO4vSxwwZtUjUWHo Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk+hHVsACgkQ8kTtMUmk6EyCPQCfTL3YBl6zs757vKh/UBeKq5zW VKQAnj3F1bnBRY3qhym+H/CCYs2kZDFU =/yuN -----END PGP SIGNATURE----- --bO4vSxwwZtUjUWHo--