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-- 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 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-- From owner-freebsd-arch@FreeBSD.ORG Wed May 2 12:57:08 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 B41DD1065676; Wed, 2 May 2012 12:57:08 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 766E28FC08; Wed, 2 May 2012 12:57:08 +0000 (UTC) Received: from ds4.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id DC2AD6C72; Wed, 2 May 2012 12:57:07 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 953358ACA; Wed, 2 May 2012 14:57:07 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Baptiste Daroussin References: <20120502114115.GG31034@azathoth.lan> Date: Wed, 02 May 2012 14:57:07 +0200 In-Reply-To: <20120502114115.GG31034@azathoth.lan> (Baptiste Daroussin's message of "Wed, 2 May 2012 13:41:15 +0200") Message-ID: <8662ceivvg.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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:57:08 -0000 Baptiste Daroussin writes: > I plan to import the read part or tinycdb into libc and the write part in= to > libutil (to avoid cluttering libc). I would prefer having everything in one place. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-arch@FreeBSD.ORG Wed May 2 13:02:11 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 4E2A11065675 for ; Wed, 2 May 2012 13:02:11 +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 31FC68FC16; Wed, 2 May 2012 13:02:11 +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 q42D2BVx029542; Wed, 2 May 2012 13:02:11 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q42D2A4c029541; Wed, 2 May 2012 13:02:10 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 15:02:07 +0200 From: Baptiste Daroussin To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Message-ID: <20120502130206.GL31034@azathoth.lan> References: <20120502114115.GG31034@azathoth.lan> <8662ceivvg.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+278g007AL/ykmV8" Content-Disposition: inline In-Reply-To: <8662ceivvg.fsf@ds4.des.no> 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 13:02:11 -0000 --+278g007AL/ykmV8 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 02, 2012 at 02:57:07PM +0200, Dag-Erling Sm=F8rgrav wrote: > Baptiste Daroussin writes: > > I plan to import the read part or tinycdb into libc and the write part = into > > libutil (to avoid cluttering libc). >=20 > I would prefer having everything in one place. >=20 Ok I'll do that way. Bapt --+278g007AL/ykmV8 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk+hME4ACgkQ8kTtMUmk6Ey2hwCfXkSEjms85RrQ5lgO6FUoJ6nn QqQAnRUUkyohsNQ0oC2feSSwHAReJf0m =Y2iU -----END PGP SIGNATURE----- --+278g007AL/ykmV8-- From owner-freebsd-arch@FreeBSD.ORG Wed May 2 13:42:45 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 6D8C11065672; Wed, 2 May 2012 13:42:45 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 2D11A8FC0C; Wed, 2 May 2012 13:42:45 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id BCB847300A; Wed, 2 May 2012 16:02:35 +0200 (CEST) Date: Wed, 2 May 2012 16:02:35 +0200 From: Luigi Rizzo To: Baptiste Daroussin Message-ID: <20120502140235.GA91732@onelab2.iet.unipi.it> References: <20120502114115.GG31034@azathoth.lan> <20120502123149.GI31034@azathoth.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120502123149.GI31034@azathoth.lan> User-Agent: Mutt/1.4.2.3i 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 13:42:45 -0000 On Wed, May 02, 2012 at 02:31:49PM +0200, Baptiste Daroussin wrote: ... > > > 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 ? > > All in libc ok then it makes sense to preserve the structure and have everything in libc as des suggested. Just a curiosity again, any estimate of code size ? cheers luigi From owner-freebsd-arch@FreeBSD.ORG Wed May 2 13:45:52 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 0268F106564A for ; Wed, 2 May 2012 13:45:51 +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 9ECCE8FC08; Wed, 2 May 2012 13:45:51 +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 q42Djp6V067919; Wed, 2 May 2012 13:45:51 GMT (envelope-from bapt@freebsd.org) Received: (from bapt@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q42DjpoU067915; Wed, 2 May 2012 13:45:51 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 15:45:47 +0200 From: Baptiste Daroussin To: Luigi Rizzo Message-ID: <20120502134546.GM31034@azathoth.lan> References: <20120502114115.GG31034@azathoth.lan> <20120502123149.GI31034@azathoth.lan> <20120502140235.GA91732@onelab2.iet.unipi.it> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tDYGg60iReQ7u8wj" Content-Disposition: inline In-Reply-To: <20120502140235.GA91732@onelab2.iet.unipi.it> 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 13:45:52 -0000 --tDYGg60iReQ7u8wj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 02, 2012 at 04:02:35PM +0200, Luigi Rizzo wrote: > On Wed, May 02, 2012 at 02:31:49PM +0200, Baptiste Daroussin wrote: > ... > > > > Why importing to libc? to allow all the get*ent to parse the /etc/*= =2Edb > > > > 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 ? > >=20 > > All in libc >=20 > ok then it makes sense to preserve the structure and have > everything in libc as des suggested. Just a curiosity again, > any estimate of code size ? >=20 That is pretty small: 545 cdb.c 76 cdb_find.c 81 cdb_findnext.c 19 cdb_hash.c 113 cdb_init.c 184 cdb_make.c 50 cdb_make_add.c 204 cdb_make_put.c 100 cdb_seek.c 29 cdb_seq.c 18 cdb_unpack.c 126 cdb.h 41 cdb_int.h 1586 total regards, Bapt --tDYGg60iReQ7u8wj Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk+hOooACgkQ8kTtMUmk6EwmMACfa+2OkTVU/F+pdG2KLFGzLzVk AW8AnjtkB2ycFQDNMeRcIHw3sql7j9Gu =1TND -----END PGP SIGNATURE----- --tDYGg60iReQ7u8wj-- From owner-freebsd-arch@FreeBSD.ORG Wed May 2 14:13:51 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 77AC2106564A; Wed, 2 May 2012 14:13:51 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 360808FC0A; Wed, 2 May 2012 14:13:51 +0000 (UTC) Received: from ds4.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id 38B436CB2; Wed, 2 May 2012 14:13:50 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 0AAAC8AD9; Wed, 2 May 2012 16:13:49 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Baptiste Daroussin References: <20120502114115.GG31034@azathoth.lan> <20120502123149.GI31034@azathoth.lan> <20120502140235.GA91732@onelab2.iet.unipi.it> <20120502134546.GM31034@azathoth.lan> Date: Wed, 02 May 2012 16:13:49 +0200 In-Reply-To: <20120502134546.GM31034@azathoth.lan> (Baptiste Daroussin's message of "Wed, 2 May 2012 15:45:47 +0200") Message-ID: <861un2isbm.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 14:13:51 -0000 Baptiste Daroussin writes: > That is pretty small: > 545 cdb.c > 76 cdb_find.c > 81 cdb_findnext.c > 19 cdb_hash.c > 113 cdb_init.c > 184 cdb_make.c > 50 cdb_make_add.c > 204 cdb_make_put.c > 100 cdb_seek.c > 29 cdb_seq.c > 18 cdb_unpack.c > 126 cdb.h > 41 cdb_int.h > 1586 total kB or LOC? DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-arch@FreeBSD.ORG Wed May 2 14:21:10 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 99891106566B for ; Wed, 2 May 2012 14:21:10 +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 7A12D8FC12; Wed, 2 May 2012 14:21:10 +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 q42ELADp002180; Wed, 2 May 2012 14:21:10 GMT (envelope-from bapt@freebsd.org) Received: (from bapt@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q42ELATR002167; Wed, 2 May 2012 14:21:10 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 16:21:06 +0200 From: Baptiste Daroussin To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Message-ID: <20120502142106.GO31034@azathoth.lan> References: <20120502114115.GG31034@azathoth.lan> <20120502123149.GI31034@azathoth.lan> <20120502140235.GA91732@onelab2.iet.unipi.it> <20120502134546.GM31034@azathoth.lan> <861un2isbm.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NT59pYSnj1ZLVgEN" Content-Disposition: inline In-Reply-To: <861un2isbm.fsf@ds4.des.no> 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 14:21:10 -0000 --NT59pYSnj1ZLVgEN Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 02, 2012 at 04:13:49PM +0200, Dag-Erling Sm=F8rgrav wrote: > Baptiste Daroussin writes: > > That is pretty small: > > 545 cdb.c > > 76 cdb_find.c > > 81 cdb_findnext.c > > 19 cdb_hash.c > > 113 cdb_init.c > > 184 cdb_make.c > > 50 cdb_make_add.c > > 204 cdb_make_put.c > > 100 cdb_seek.c > > 29 cdb_seq.c > > 18 cdb_unpack.c > > 126 cdb.h > > 41 cdb_int.h > > 1586 total >=20 > kB or LOC? LOC --NT59pYSnj1ZLVgEN Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk+hQtIACgkQ8kTtMUmk6EzuGACdHlAdB0jCRgbt57n2JBpD3FDo ZpQAnioM0X695J08cjuYjP3BTuKqVvyx =dXRG -----END PGP SIGNATURE----- --NT59pYSnj1ZLVgEN-- From owner-freebsd-arch@FreeBSD.ORG Wed May 2 14:47:17 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 103EE106564A; Wed, 2 May 2012 14:47:17 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 09C418FC08; Wed, 2 May 2012 14:47:15 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q42El6eY092548; Wed, 2 May 2012 17:47:07 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q42El61A050203; Wed, 2 May 2012 17:47:06 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q42El6Cd050202; Wed, 2 May 2012 17:47:06 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 2 May 2012 17:47:06 +0300 From: Konstantin Belousov To: Baptiste Daroussin Message-ID: <20120502144706.GZ2358@deviant.kiev.zoral.com.ua> References: <20120502114115.GG31034@azathoth.lan> <20120502123149.GI31034@azathoth.lan> <20120502140235.GA91732@onelab2.iet.unipi.it> <20120502134546.GM31034@azathoth.lan> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4TmI2E81ZwFURtAX" Content-Disposition: inline In-Reply-To: <20120502134546.GM31034@azathoth.lan> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua 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 14:47:17 -0000 --4TmI2E81ZwFURtAX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 02, 2012 at 03:45:47PM +0200, Baptiste Daroussin wrote: > On Wed, May 02, 2012 at 04:02:35PM +0200, Luigi Rizzo wrote: > > On Wed, May 02, 2012 at 02:31:49PM +0200, Baptiste Daroussin wrote: > > ... > > > > > 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 ? > > >=20 > > > All in libc > >=20 > > ok then it makes sense to preserve the structure and have > > everything in libc as des suggested. Just a curiosity again, > > any estimate of code size ? > >=20 >=20 > That is pretty small: > 545 cdb.c > 76 cdb_find.c > 81 cdb_findnext.c > 19 cdb_hash.c > 113 cdb_init.c > 184 cdb_make.c > 50 cdb_make_add.c > 204 cdb_make_put.c > 100 cdb_seek.c > 29 cdb_seq.c > 18 cdb_unpack.c > 126 cdb.h > 41 cdb_int.h > 1586 total > regards, > Bapt I do not think that the size matters at all, as far as it fits into tens of KB of compiled code. What I do care a lot there, is the namespace pollution. I would strongly object against exposing cdb symbols from libc, even in the private namespace. Having the symbols hidden in libc is fine. The reasoning is that we do not want our libc unneccessary interpose symbols from third-party libs, and do not want to make a surprise for somebody who wants to use the never version of the same library, or use a symbol not documented in SUSv4 etc while linking to libc/libpthread only. --4TmI2E81ZwFURtAX Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk+hSOkACgkQC3+MBN1Mb4jatwCeNx/nPsr+Fe8xWzaFUasXNQEw uhgAmwcU5SQCaG/5Kzlm9JH3Tza8Jd4v =AEki -----END PGP SIGNATURE----- --4TmI2E81ZwFURtAX-- From owner-freebsd-arch@FreeBSD.ORG Wed May 2 14:50:50 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 D9A06106564A for ; Wed, 2 May 2012 14:50:50 +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 A07F78FC16; Wed, 2 May 2012 14:50:50 +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 q42Eoo4a026592; Wed, 2 May 2012 14:50:50 GMT (envelope-from bapt@freebsd.org) Received: (from bapt@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q42EonvZ026511; Wed, 2 May 2012 14:50:49 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 16:50:46 +0200 From: Baptiste Daroussin To: Konstantin Belousov Message-ID: <20120502145045.GP31034@azathoth.lan> References: <20120502114115.GG31034@azathoth.lan> <20120502123149.GI31034@azathoth.lan> <20120502140235.GA91732@onelab2.iet.unipi.it> <20120502134546.GM31034@azathoth.lan> <20120502144706.GZ2358@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="r/w8vo2lxBmCPGjQ" Content-Disposition: inline In-Reply-To: <20120502144706.GZ2358@deviant.kiev.zoral.com.ua> 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 14:50:50 -0000 --r/w8vo2lxBmCPGjQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 02, 2012 at 05:47:06PM +0300, Konstantin Belousov wrote: > On Wed, May 02, 2012 at 03:45:47PM +0200, Baptiste Daroussin wrote: > > On Wed, May 02, 2012 at 04:02:35PM +0200, Luigi Rizzo wrote: > > > On Wed, May 02, 2012 at 02:31:49PM +0200, Baptiste Daroussin wrote: > > > ... > > > > > > Why importing to libc? to allow all the get*ent to parse the /e= tc/*.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 ? > > > >=20 > > > > All in libc > > >=20 > > > ok then it makes sense to preserve the structure and have > > > everything in libc as des suggested. Just a curiosity again, > > > any estimate of code size ? > > >=20 > >=20 > > That is pretty small: > > 545 cdb.c > > 76 cdb_find.c > > 81 cdb_findnext.c > > 19 cdb_hash.c > > 113 cdb_init.c > > 184 cdb_make.c > > 50 cdb_make_add.c > > 204 cdb_make_put.c > > 100 cdb_seek.c > > 29 cdb_seq.c > > 18 cdb_unpack.c > > 126 cdb.h > > 41 cdb_int.h > > 1586 total > > regards, > > Bapt > I do not think that the size matters at all, as far as it fits into tens > of KB of compiled code. >=20 > What I do care a lot there, is the namespace pollution. I would strongly > object against exposing cdb symbols from libc, even in the private > namespace. Having the symbols hidden in libc is fine. >=20 > The reasoning is that we do not want our libc unneccessary interpose > symbols from third-party libs, and do not want to make a surprise for > somebody who wants to use the never version of the same library, or use > a symbol not documented in SUSv4 etc while linking to libc/libpthread > only. I do understand that, I know need to learn how we can do that cleaning regards, Bapt --r/w8vo2lxBmCPGjQ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk+hScUACgkQ8kTtMUmk6Ex/5gCfYJWfXroLkzL9r/vwXi/gLeJv oWcAmwY9nkO6dSw4Q+88z5qUK0DNde1r =VTXr -----END PGP SIGNATURE----- --r/w8vo2lxBmCPGjQ-- From owner-freebsd-arch@FreeBSD.ORG Wed May 2 16:13:47 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 D543A106566B; Wed, 2 May 2012 16:13:47 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 918EC8FC0C; Wed, 2 May 2012 16:13:47 +0000 (UTC) Received: from ds4.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id 144396D09; Wed, 2 May 2012 16:13:46 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id C302F8AF1; Wed, 2 May 2012 18:13:45 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Baptiste Daroussin References: <20120502114115.GG31034@azathoth.lan> <20120502123149.GI31034@azathoth.lan> <20120502140235.GA91732@onelab2.iet.unipi.it> <20120502134546.GM31034@azathoth.lan> <20120502144706.GZ2358@deviant.kiev.zoral.com.ua> <20120502145045.GP31034@azathoth.lan> Date: Wed, 02 May 2012 18:13:45 +0200 In-Reply-To: <20120502145045.GP31034@azathoth.lan> (Baptiste Daroussin's message of "Wed, 2 May 2012 16:50:46 +0200") Message-ID: <86txzyh87a.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Konstantin Belousov , 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 16:13:47 -0000 Baptiste Daroussin writes: > Konstantin Belousov writes: > > The reasoning is that we do not want our libc unneccessary interpose > > symbols from third-party libs, and do not want to make a surprise for > > somebody who wants to use the never version of the same library, or use > > a symbol not documented in SUSv4 etc while linking to libc/libpthread > > only. > I do understand that, I know need to learn how we can do that cleaning If we go that route, I would suggest having the complete library as libcdb, and a copy of the read part hidden inside libc for getpw*() etc. To hide the cdb code inside libc, you need to add #define cdb_foo _cdb_foo to src/lib/libc/include/namespace.h and #undef cdb_foo to src/lib/libc/include/un-namespace.h, for appropriate values of "foo" ("init", "find" etc.), then wrap the #include directives in the cdb source with #include /* ... */ #include . Within libc, you must call _cdb_foo() instead of cdb_foo(); outside of libc, you call cdb_foo() as usual, and link with -lcdb. To avoid duplicating the cdb source code, you will need to create src/lib/libcdb/{un-,}namespace.h as empty files and add -I${SRCDIR} to CFLAGS in src/lib/libcdb/Makefile. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-arch@FreeBSD.ORG Wed May 2 16:24:34 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 C3BB3106564A; Wed, 2 May 2012 16:24:34 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 0653D8FC14; Wed, 2 May 2012 16:24:33 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q42GOMqx059251; Wed, 2 May 2012 19:24:22 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q42GOL19062796; Wed, 2 May 2012 19:24:21 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q42GOLoJ062795; Wed, 2 May 2012 19:24:21 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 2 May 2012 19:24:21 +0300 From: Konstantin Belousov To: Dag-Erling Sm??rgrav Message-ID: <20120502162421.GB2358@deviant.kiev.zoral.com.ua> References: <20120502114115.GG31034@azathoth.lan> <20120502123149.GI31034@azathoth.lan> <20120502140235.GA91732@onelab2.iet.unipi.it> <20120502134546.GM31034@azathoth.lan> <20120502144706.GZ2358@deviant.kiev.zoral.com.ua> <20120502145045.GP31034@azathoth.lan> <86txzyh87a.fsf@ds4.des.no> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/Gw7yEOBEhjvPbkH" Content-Disposition: inline In-Reply-To: <86txzyh87a.fsf@ds4.des.no> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Baptiste Daroussin , 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 16:24:34 -0000 --/Gw7yEOBEhjvPbkH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 02, 2012 at 06:13:45PM +0200, Dag-Erling Sm??rgrav wrote: > Baptiste Daroussin writes: > > Konstantin Belousov writes: > > > The reasoning is that we do not want our libc unneccessary interpose > > > symbols from third-party libs, and do not want to make a surprise for > > > somebody who wants to use the never version of the same library, or u= se > > > a symbol not documented in SUSv4 etc while linking to libc/libpthread > > > only. > > I do understand that, I know need to learn how we can do that cleaning >=20 > If we go that route, I would suggest having the complete library as > libcdb, and a copy of the read part hidden inside libc for getpw*() etc. >=20 > To hide the cdb code inside libc, you need to add >=20 > #define cdb_foo _cdb_foo >=20 > to src/lib/libc/include/namespace.h and >=20 > #undef cdb_foo >=20 > to src/lib/libc/include/un-namespace.h, for appropriate values of "foo" > ("init", "find" etc.), then wrap the #include directives in the cdb > source with #include /* ... */ #include . > Within libc, you must call _cdb_foo() instead of cdb_foo(); outside of > libc, you call cdb_foo() as usual, and link with -lcdb. >=20 > To avoid duplicating the cdb source code, you will need to create > src/lib/libcdb/{un-,}namespace.h as empty files and add -I${SRCDIR} to > CFLAGS in src/lib/libcdb/Makefile. The _[a-z] symbols are in application namespace, so the typical namespace.h gymnastic is somewhat doubtful. It is indeed needed for the exported symbols, to allow both interposing and libc usage of the right symbol internally. I do not think we need this at all for cdb, which symbols we should not export from libc. Just do not expose symbols, i.e. do not mention them in the version script for libc, is enough. The static linking is the lost case anyway. --/Gw7yEOBEhjvPbkH Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk+hX7UACgkQC3+MBN1Mb4jIhACgkKYNxxWxFRNdcUmOgJccYImX +noAniTnCzcquvrR9eAABoTzD5zHrQwR =gFHk -----END PGP SIGNATURE----- --/Gw7yEOBEhjvPbkH-- From owner-freebsd-arch@FreeBSD.ORG Wed May 2 16:30:23 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 AD54B106566C; Wed, 2 May 2012 16:30:23 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 68D298FC17; Wed, 2 May 2012 16:30:23 +0000 (UTC) Received: from ds4.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id B3CAC6D1A; Wed, 2 May 2012 16:30:22 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 50BE68AF4; Wed, 2 May 2012 18:30:22 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Konstantin Belousov References: <20120502114115.GG31034@azathoth.lan> <20120502123149.GI31034@azathoth.lan> <20120502140235.GA91732@onelab2.iet.unipi.it> <20120502134546.GM31034@azathoth.lan> <20120502144706.GZ2358@deviant.kiev.zoral.com.ua> <20120502145045.GP31034@azathoth.lan> <86txzyh87a.fsf@ds4.des.no> <20120502162421.GB2358@deviant.kiev.zoral.com.ua> Date: Wed, 02 May 2012 18:30:21 +0200 In-Reply-To: <20120502162421.GB2358@deviant.kiev.zoral.com.ua> (Konstantin Belousov's message of "Wed, 2 May 2012 19:24:21 +0300") Message-ID: <86pqamh7fm.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Baptiste Daroussin , 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 16:30:23 -0000 Konstantin Belousov writes: > I do not think we need this at all for cdb, which symbols we should not > export from libc. Just do not expose symbols, i.e. do not mention them > in the version script for libc, is enough. The static linking is the > lost case anyway. Great - no need to modify the source then :) I wasn't sure if leaving the symbols out of the version script actually hid them or if it just made them unversioned. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-arch@FreeBSD.ORG Thu May 3 00:51:47 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 2222D106564A; Thu, 3 May 2012 00:51:47 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pz0-f49.google.com (mail-pz0-f49.google.com [209.85.210.49]) by mx1.freebsd.org (Postfix) with ESMTP id E35A68FC0A; Thu, 3 May 2012 00:51:46 +0000 (UTC) Received: by dadm1 with SMTP id m1so718092dad.8 for ; Wed, 02 May 2012 17:51:46 -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=mjwjG0vgdVBjBgoMY3/rinNGxvgnkjz7iMgMWvZf9Bs=; b=uwJiMxkbTlJ5RQyLNL0KuG2jTiUwAKXisVm1bfWM1Dqhwr0hUOfUT2HQItkJp2lIps 76wMogLp262+TVw7vHB0YplENmehpRvVrA3gc/1XQTkLGXpEtVxHjUdn0eTQiwI8nAtz umDFFofHvls9febeYL2lx+cgeugGDi7ZjOADpVqgzvDnk5yi85aRiPub8Y/W3ZBO7ztj d7ItWMu5WtXByB41k7PbC0+S5VtkgRWxc/wBx/rsOqVlMS5FF/uLNpM18XTaSI/Whbt/ e0RFH6B0Xfsc3qq9QWcDJ3lkgsKKCg+x38hEPTbNNKKPu8Q582uy0F4FNOjMpJ+7zDUs SBRQ== MIME-Version: 1.0 Received: by 10.68.221.74 with SMTP id qc10mr2132037pbc.80.1336006306770; Wed, 02 May 2012 17:51:46 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.142.101.9 with HTTP; Wed, 2 May 2012 17:51:46 -0700 (PDT) In-Reply-To: <20120502114115.GG31034@azathoth.lan> References: <20120502114115.GG31034@azathoth.lan> Date: Wed, 2 May 2012 17:51:46 -0700 X-Google-Sender-Auth: QL1XhiA-L4R6Wk841hUX_ZJq5Ao Message-ID: From: Adrian Chadd To: Baptiste Daroussin Content-Type: text/plain; charset=ISO-8859-1 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: Thu, 03 May 2012 00:51:47 -0000 Hi, Which .db files are you proposing modifying in a cross-build environment, rather than having a local tool generate them? (I do cross-builds all the time. I re-generate the .db files in /etc in startup scripts on my devices..) adrian From owner-freebsd-arch@FreeBSD.ORG Thu May 3 05:29:03 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 37508106566B; Thu, 3 May 2012 05:29:03 +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 1B2B08FC0A; Thu, 3 May 2012 05:29:03 +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 q435T20s042725; Thu, 3 May 2012 05:29:02 GMT (envelope-from bapt@freebsd.org) Received: (from bapt@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q435T2Ru042724; Thu, 3 May 2012 05:29:02 GMT (envelope-from bapt@freebsd.org) X-Authentication-Warning: freefall.freebsd.org: bapt set sender to bapt@freebsd.org using -f Date: Thu, 3 May 2012 07:28:59 +0200 From: Baptiste Daroussin To: Adrian Chadd Message-ID: <20120503052858.GB56106@azathoth.lan> References: <20120502114115.GG31034@azathoth.lan> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="RASg3xLB4tUQ4RcS" 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: Thu, 03 May 2012 05:29:03 -0000 --RASg3xLB4tUQ4RcS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 02, 2012 at 05:51:46PM -0700, Adrian Chadd wrote: > Hi, >=20 > Which .db files are you proposing modifying in a cross-build > environment, rather than having a local tool generate them? >=20 > (I do cross-builds all the time. I re-generate the .db files in /etc > in startup scripts on my devices..) >=20 >=20 All have a local tool to generate, but a local tool I can call from and amd= 64 pkgng trying to install arm eb packages in a arm eb chroot user for example, in preinstallation some users can be created that would be needed during the extraction phase for example, etc. regards, Bapt --RASg3xLB4tUQ4RcS Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk+iF5oACgkQ8kTtMUmk6ExAdACfeuWEtEwPh2s1GemEgJ03fF/+ 5bQAn2ozmc9K/YEHFjCYaP7fofTHIO1W =Y/52 -----END PGP SIGNATURE----- --RASg3xLB4tUQ4RcS-- From owner-freebsd-arch@FreeBSD.ORG Thu May 3 14:14:03 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 9803F1065670; Thu, 3 May 2012 14:14:03 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) by mx1.freebsd.org (Postfix) with ESMTP id F3BE68FC0A; Thu, 3 May 2012 14:14:02 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.4/8.14.4) with ESMTP id q43ECkZ0064300; Thu, 3 May 2012 09:12:47 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.4/8.14.4/Submit) id q43ECkVp064299; Thu, 3 May 2012 09:12:46 -0500 (CDT) (envelope-from brooks) Date: Thu, 3 May 2012 09:12:46 -0500 From: Brooks Davis To: Adrian Chadd Message-ID: <20120503141246.GA57219@lor.one-eyed-alien.net> References: <20120502114115.GG31034@azathoth.lan> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xHFwDpU9dbj6ez1V" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Baptiste Daroussin , 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: Thu, 03 May 2012 14:14:03 -0000 --xHFwDpU9dbj6ez1V Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 02, 2012 at 05:51:46PM -0700, Adrian Chadd wrote: > Hi, >=20 > Which .db files are you proposing modifying in a cross-build > environment, rather than having a local tool generate them? >=20 > (I do cross-builds all the time. I re-generate the .db files in /etc > in startup scripts on my devices..) While that's often a useful model, it seems to me that we'd prefer to be able to generate .db files for use on readonly root file systems. Sure we've go tricks to work around that, but if we can avoid them that's all to the good. -- Brooks --xHFwDpU9dbj6ez1V Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iD8DBQFPopJeXY6L6fI4GtQRApt6AKDHbrpzghpD3qHaGnPsdMDNjmS8/QCdFWEj JlQugyjuhM8WFSfKGYwh3xQ= =QgmT -----END PGP SIGNATURE----- --xHFwDpU9dbj6ez1V--