From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 25 15:29:55 2011 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89D2C1065676; Fri, 25 Mar 2011 15:29:55 +0000 (UTC) (envelope-from julien.laffaye@gmail.com) Received: from mail-gw0-f54.google.com (mail-gw0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id 19B218FC1C; Fri, 25 Mar 2011 15:29:54 +0000 (UTC) Received: by gwb15 with SMTP id 15so576311gwb.13 for ; Fri, 25 Mar 2011 08:29:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=kL/C0kvR953FR6nHUoA2moQYutPRlh+qfCVWZXQGTnI=; b=lyXuaOY7JueL32sJ1vCcEPuktDMOqafaYKycXIONYIQV6aaqS1/lddnbJlpDQs14zf 8ICchoQai+gbXPQ/jKDygxshUQkCHUxlWP0VxZklOjBszTl7vIKa7TZ9qdlKPSsE7/4a UhwXh6+uwnDmtEyttmNrKWTttggIw4jZRGRxA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=VPyKA9MgX76sU9yJNa8cBWt+/n8wWbU07OdBcOAjPkkdqr/AsKquCCADhy9z0mtbFp OVB1xGl2TUmtieAgD2Inmy8rhDMTh11aHaFMRytLqpv2SVLu8c9R9jOQNi456SzLHsu0 vQs/GgwK+yIeZY0dbbYYuos0Jy4tJZyGo2EE4= MIME-Version: 1.0 Received: by 10.236.78.133 with SMTP id g5mr1315748yhe.35.1301065385885; Fri, 25 Mar 2011 08:03:05 -0700 (PDT) Sender: julien.laffaye@gmail.com Received: by 10.236.105.212 with HTTP; Fri, 25 Mar 2011 08:03:05 -0700 (PDT) In-Reply-To: <20110325153814.20287h1594npcu80@webmail.leidinger.net> References: <20110325101111.GA36840@azathoth.lan> <20110325150653.21132ej6abxmjpgk@webmail.leidinger.net> <20110325153814.20287h1594npcu80@webmail.leidinger.net> Date: Fri, 25 Mar 2011 15:03:05 +0000 X-Google-Sender-Auth: MI45DCBFuMYG7jXWX1JVZvQfsYo Message-ID: From: Julien Laffaye To: Alexander Leidinger Content-Type: text/plain; charset=ISO-8859-1 Cc: ports@freebsd.org, Baptiste Daroussin , hackers@freebsd.org, current@freebsd.org Subject: Re: [ECFT] pkgng 0.1-alpha1: a replacement for pkg_install 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, 25 Mar 2011 15:29:55 -0000 On Fri, Mar 25, 2011 at 2:38 PM, Alexander Leidinger wrote: > Quoting Baptiste Daroussin (from Fri, 25 Mar 2011 > 15:14:52 +0100): > >> 2011/3/25 Alexander Leidinger : >>> >>> Quoting Baptiste Daroussin (from Fri, 25 Mar 2011 >>> 11:11:11 +0100): >>> >>>> pkgng is a binary package manager written from scratch for FreeBSD. >>> >>> I didn't had a look at it, just some comments about some parts you >>> explained. >>> >>>> features supported are or will be : > >>>> - a special architecture "all" allows to specify when a package can be >>>> used >>>> on every architecture. (not done yet) >>> >>> What if a package is able to install on a subset, e.g. the linuxulator >>> ports >>> are for amd64 and i386? >>> >> >> No clue for that at the moment but we are open to suggestions. > > The suggestion is easy, allow a way to specify a set of valid architectures. That looks reasonable and easy to implement. > >>> What about DB corruption/loss? Do you keep the /var/db/pkg//xxx >>> files even with pkgng and only use the DB as a way to speed up some work >>> (so >>> the DB corruption just requires to run pkg2ng), or are you lost of the DB >>> is >>> lost? >>> >> >> Nothing is done about DB corruption/loss, I am not sure we need to do >> something. >> Maybe. > > I would say "for sure". Info: In Solaris 10 sqlite is used for the service > managenemt framework (SMF). It is possible that the DB is corrupt in some > bad situations. In this case you have to rebuild the DB (script provided, > been there, had to use it). If sqlite is properly used with transactions, it is very hard to corrupt the database. But if hardware lies to us and say that the data is on disk whereas it isnt... what can we do? Another potential problem is fsync(), but if it is broken on FreeBSD we want to fix it! BTW, the goal is to only have the database and not the flat files. If you are paranoid about power outage, use something like zfs snapshots... > >> Currently a filesystem corruption/loss on /var/db/pkg would do the same. > > Put a corruption of /var/db/pkg/xyz-1/+REQUIRED_BY would only affect a small > part, and this part could be even recovered from (pkgdb from portupgrade is > able to do it). With sqlite we have atomicity! And locks! > >> but it is sqlite so we can perhaps provide a way to get compressed >> dump so user can periodically backup their database. > > It needs to be automated. Maybe periodic daily... but maybe this is not > often enough after a day of a lot of changes (think about it this way: do > you want to lose a day of changes?). The current FS based DB is very robust, > partly because there is redundant data, pertly because losing a file just > means that the very limited subset of information is lost (and a reinstall > of one port will fix it). > > Bye, > Alexander. Regards, Julien