From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1LVviY-0001Oh-5q for garchives@archives.gentoo.org; Sat, 07 Feb 2009 22:32:06 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C9F5BE0388; Sat, 7 Feb 2009 22:32:04 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id A8E04E0388 for ; Sat, 7 Feb 2009 22:32:04 +0000 (UTC) Received: from [192.168.0.100] (173-224.1-85.cust.bluewin.ch [85.1.224.173]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id B6CD164652 for ; Sat, 7 Feb 2009 22:32:03 +0000 (UTC) Subject: Re: [gentoo-dev] [RFC] DIGESTS metadata variable for cache validation From: Tiziano =?ISO-8859-1?Q?M=FCller?= To: gentoo-dev@lists.gentoo.org In-Reply-To: <498758E6.5080609@gentoo.org> References: <498758E6.5080609@gentoo.org> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-khJYRbSFN+I7ICeTN28i" Organization: Gentoo Date: Sat, 07 Feb 2009 23:31:56 +0100 Message-Id: <1234045916.24784.1373.camel@localhost> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 X-Mailer: Evolution 2.24.4 X-Archives-Salt: d672af29-b46d-46f2-9ed0-6046a0466ae6 X-Archives-Hash: 30f4c58726934a94e0fec7bffb8c42e1 --=-khJYRbSFN+I7ICeTN28i Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Am Montag, den 02.02.2009, 12:34 -0800 schrieb Zac Medico: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 >=20 > Hi, >=20 > I'd like to add a new metadata cache value called DIGESTS which will > contain a space separated list of digests which can be > used to validate the metadata cache. Like INHERITED and > DEFINED_PHASES [1], it will be automatically generated. The first > digest in the list will correspond to the ebuild. If there are any > inherited eclasses, the digests of those eclasses will follow in a > space separated list, in the same order that they occur in the > INHERITED variable. The value of the DIGESTS variable will be on > line 18 of the metadata cache (just after DEFINED_PHASES). >=20 > For the digest format, I suggest that we use the leftmost 10 > hexadecimal digits of the SHA-1 digest. The rationale for limiting > it to 10 digits (out of 40) is to save space. Due to the avalanche > effect [2], 10 digits should be sufficient to ensure that problems > resulting from hash collisions are extremely unlikely. I'd recommend to prefix the digest with a "{TYPE}" (like for hashed passwords) to be able to change the digest algorithm as needed (especially in regards to the current SHA successor competition). This allows a future package manager which might use SHA-3 for hashing (once it's released) to still check old digests. Furthermore it would allow for easier transition and only needs a definition of allowed hashes instead of a specific one. >=20 > The primary reason to use a digest for cache validation instead of a > timestamp is that it allows the cache validation mechanism to work > even if the tree is distributed with a protocol that does not > preserve timestamps, such as git or subversion. This would make it Well, usually you don't keep intermediate or generated files in a VCS, so why the metadata? > possible to distribute metadata cache directly from git and > subversion repositories (among others). Since a digest is inherently > more expensive to obtain than a timestamp, package managers may use > the Manifest entries as a digest cache, in order to avoid the need > to compute digests of ebuilds during dependency calculations. >=20 > Does the suggested approach seem reasonable? Would anybody like to > suggest any changes? Cheers, Tiziano --=20 =EF=BB=BF------------------------------------------------------- Tiziano M=C3=BCller Gentoo Linux Developer, Council Member Areas of responsibility: Samba, PostgreSQL, CPP, Python, sysadmin E-Mail : dev-zero@gentoo.org GnuPG FP : F327 283A E769 2E36 18D5 4DE2 1B05 6A63 AE9C 1E30 --=-khJYRbSFN+I7ICeTN28i Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Dies ist ein digital signierter Nachrichtenteil -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEABECAAYFAkmOC9wACgkQGwVqY66cHjAm6QCfaVYv1Hg+NK323uH98pzOS8fy wecAn3oapnx7o1bClsMcKak6amsv8jjz =YpL+ -----END PGP SIGNATURE----- --=-khJYRbSFN+I7ICeTN28i--