Date: Sat, 12 May 2007 05:43:30 +1000 From: Peter Jeremy <peterjeremy@optushome.com.au> To: freebsd-hackers@freebsd.org Subject: Re: New FreeBSD package system (a.k.a. Daemon Package System (dps)) Message-ID: <20070511194330.GL826@turion.vk2pj.dyndns.org> In-Reply-To: <20070511153448.GA7516@britannica.bec.de> References: <200705102105.27271.blackdragon@highveldmail.co.za> <f20c8u$htp$1@sea.gmane.org> <4644847A.5060702@freebsd.org> <20070511153448.GA7516@britannica.bec.de>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 <joerg@britannica.bec.de>= 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070511194330.GL826>