From owner-freebsd-hackers@FreeBSD.ORG Fri May 11 19:43:48 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1E95B16A50C for ; Fri, 11 May 2007 19:43:48 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (c220-239-3-125.belrs4.nsw.optusnet.com.au [220.239.3.125]) by mx1.freebsd.org (Postfix) with ESMTP id 5ECE213C53D for ; Fri, 11 May 2007 19:43:33 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by turion.vk2pj.dyndns.org (8.14.1/8.14.1) with ESMTP id l4BJhUYt010044 for ; Sat, 12 May 2007 05:43:30 +1000 (EST) (envelope-from peter@turion.vk2pj.dyndns.org) Received: (from peter@localhost) by turion.vk2pj.dyndns.org (8.14.1/8.14.1/Submit) id l4BJhUw0010043 for freebsd-hackers@freebsd.org; Sat, 12 May 2007 05:43:30 +1000 (EST) (envelope-from peter) Date: Sat, 12 May 2007 05:43:30 +1000 From: Peter Jeremy To: freebsd-hackers@freebsd.org Message-ID: <20070511194330.GL826@turion.vk2pj.dyndns.org> References: <200705102105.27271.blackdragon@highveldmail.co.za> <4644847A.5060702@freebsd.org> <20070511153448.GA7516@britannica.bec.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="eqp4TxRxnD4KrmFZ" Content-Disposition: inline In-Reply-To: <20070511153448.GA7516@britannica.bec.de> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.14 (2007-02-12) Subject: Re: New FreeBSD package system (a.k.a. Daemon Package System (dps)) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2007 19:43:48 -0000 --eqp4TxRxnD4KrmFZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2007-May-11 17:34:48 +0200, Joerg Sonnenberger = wrote: >On Fri, May 11, 2007 at 07:58:02AM -0700, Tim Kientzle wrote: >> 3) As DES pointed out, the package tools must be able >> to read the metadata before the files. If you really >> need a completely separate metadata file, make it >> the second file in the archive. > >Actually, the argument is pretty weak. Being able to extract them >streamable and access the meta-data easily is fine. The remote access >argument is very weak as it doesn't allow e.g. signature checks. Possible options for signature checks on a stream: 1) Have one of the early metadata files be a signed set of hashes for all the expected files. Validate that file and if it's OK use the hashes to validate the other files as they are unloaded. You can check at the end that you have everything you were expecting. 2) Make pkg_add itself transactional (close to ACID): Unload the files into the final locations with temporary names and mode 000. At the end of stream, check the signature. If it's OK, just rename all the files and fix the modes, otherwise delete them all. Rename/chmod is much cheaper than copying the files (and something tar does anyway - you are just delaying it). This has the added benefit that nothing else can use the package until it's completely unpacked. --=20 Peter Jeremy --eqp4TxRxnD4KrmFZ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFGRMdi/opHv/APuIcRAvJkAKClEK8OeIXCCnAC9dOkE88h27yu8QCeJZYi JX/uZC8JZ7Nbljt0LYTHvCk= =Bmlo -----END PGP SIGNATURE----- --eqp4TxRxnD4KrmFZ--