From owner-freebsd-pkgbase@freebsd.org Thu Mar 10 14:53:02 2016 Return-Path: Delivered-To: freebsd-pkgbase@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 75DCAACACEC for ; Thu, 10 Mar 2016 14:53:02 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3A06366E; Thu, 10 Mar 2016 14:53:02 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1ae1xQ-0005Wm-Ou; Thu, 10 Mar 2016 17:52:56 +0300 Date: Thu, 10 Mar 2016 17:52:56 +0300 From: Slawa Olhovchenkov To: Matthew Seaman Cc: freebsd-pkgbase@freebsd.org Subject: Re: [CFT] packaging the base system with pkg(8) Message-ID: <20160310145256.GK70809@zxy.spb.ru> References: <20160302235429.GD75641@FreeBSD.org> <20160308124016.GA70809@zxy.spb.ru> <20160310123225.GJ70809@zxy.spb.ru> <56E182F2.9060004@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56E182F2.9060004@freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: freebsd-pkgbase@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Packaging the FreeBSD base system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Mar 2016 14:53:02 -0000 On Thu, Mar 10, 2016 at 02:21:38PM +0000, Matthew Seaman wrote: > On 03/10/16 12:32, Slawa Olhovchenkov wrote: > > /var/db/pkg is placed on /var and separated from beadm control > > (zroot/ROOT). As result, switching OS install by beadm give > > incorrectly information about installed packages. For correcting this > > need separatly pkg database for system packages under beadm control. > > > > Same for etcupdate database. > > This isn't the case if you're using the default ZFS layout the installer > provides nowadays. Most of /var is included in the BE, with certain > exceptions like /var/log which are overlaid on the BE. Hmm, like ZFS layout changed from install to install. OK, current layout also vrong: # df -k /var/db/ Filesystem 1024-blocks Used Avail Capacity Mounted on zroot/ROOT/default 194012148 946496 193065652 0% / # ls -l /var/db total 237 drwx------ 2 operator operator 10 Mar 10 17:44 entropy drwxr-xr-x 3 root wheel 4 Feb 11 23:35 etcupdate drwx------ 2 root wheel 2 Feb 11 23:34 freebsd-update drwx------ 2 root wheel 2 Feb 11 23:34 hyperv drwx------ 2 root wheel 2 Feb 11 23:34 ipf -r--r--r-- 1 nobody wheel 382120 Mar 5 04:15 locate.database -rw------- 1 root wheel 28633 Feb 11 23:35 mergemaster.mtree -rw-r--r-- 1 root wheel 46 Feb 24 16:04 mounttab drwx------ 2 root wheel 2 Feb 11 23:34 ntp -rw-r--r-- 1 root wheel 7 Mar 10 16:57 ntpd.drift drwxr-xr-x 2 root wheel 6 Feb 28 17:08 pkg drwxr-xr-x 2 root wheel 2 Feb 11 23:34 ports drwxr-xr-x 2 root wheel 2 Feb 11 23:34 portsnap drwxr-xr-x 2 redis redis 3 Mar 10 17:43 redis -rw-r--r-- 1 root wheel 256 Feb 23 14:57 statd.status drwx--x--x 3 root wheel 3 Nov 10 19:22 sudo -rw-r--r-- 1 root wheel 14 Feb 12 18:48 zoneinfo I.e. all DBMS will be lost data on OS switch, ntp lost information, information about installing and removing non-system packages also lost and packages too (i.e. I can't install MySQL and time later switch back to previos OS version w/o lost of data and installed packages).