From owner-freebsd-current@freebsd.org Fri Aug 14 20:26:19 2015 Return-Path: Delivered-To: freebsd-current@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 909D59BAA96 for ; Fri, 14 Aug 2015 20:26:19 +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 427AF1F08; Fri, 14 Aug 2015 20:26:19 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1ZQLYP-0008y2-17; Fri, 14 Aug 2015 23:26:17 +0300 Date: Fri, 14 Aug 2015 23:26:16 +0300 From: Slawa Olhovchenkov To: John Baldwin Cc: freebsd-current@freebsd.org, Baptiste Daroussin Subject: Re: [CFT] rewrite of the merge(1) utility Message-ID: <20150814202616.GJ1872@zxy.spb.ru> References: <20150726012619.GP21594@ivaldir.etoilebsd.net> <2075305.SMzFbTQNGK@ralph.baldwin.cx> <20150814193146.GI1872@zxy.spb.ru> <160018322.PNgSqJIXNP@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <160018322.PNgSqJIXNP@ralph.baldwin.cx> User-Agent: Mutt/1.5.23 (2014-03-12) 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-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2015 20:26:19 -0000 On Fri, Aug 14, 2015 at 12:59:30PM -0700, John Baldwin wrote: > > > There are a few ways. Newer installs do bootstrap it for you, so if you > > > follow the traditional source upgrade method you can just run 'etcupdate' > > > in place of 'mergemaster'. If you do not want to have a /usr/src tree, > > > how are you updating your world? > > > > yes, I don't want to have /usr/src tree. > > I have buld host and run release.sh. > > After done I use R/ftp/*.txz for extract on target host. > > I see var/db/etcupdate/current in base.txz. > > But I don't cleanly understund etcupdate: > > - is this enough (var/db/etcupdate/current from base.txz)? > > - what is best way to preserve var/db/etcupdate/current before > > extract? > > - do I need some work for record changes in /etc? > > In this model, I think etcupdate isn't really what you need/want. > For one, if you extract base.txz it already overwrites your files > in /etc and loses any local changes (including any files that Of couse, I am dont extract from base.txz /etc and /var itself, only var/db/etcupdate. > etcupdate would upgrade). It doesn't lose new files like /etc/fstab > or /etc/rc.conf, but if you make changes to existing files (like > /etc/ttys) then extracting base.txz will overwrite those with the > stock versions. If you wanted to not overwrite /etc then you could > use etcupdate to merge in the changes to /etc instead. However, > you would need to do something like this: > > 1) Ignore /etc and /var/db/etcupdate/current when you extract > base.txz via --exclude. Actual command is: tar xf - --exclude ./boot/device.hints ./COPYRIGHT boot dev media mnt proc tmp bin lib libexec rescue sbin usr because tar don't allow include/exclude and var in base.txz also contains var/log/sendmail.st, var/crash/minfree, var/db/mergemaster.mtree, var/db/locate.database. > 2) Extract just /var/db/etcupdate/current from base.txz to > some other temporary location (/some/tmp/path). > > 3) Create a new tarball from that tree > ( tar cfy foo.tbz -C /some/tmp/path/var/db/etcupdate/current . ) > > 4) Use foo.tbz with etcupdate as the tarball (etcupdate -t foo.tbz) Thanks, I try this. > Alternatively, you could save on steps 2 + 3 by patching your release > process to run 'etcupdate build' (you can see where the current release > Makefile runs 'etcupdate extract' and use 'build' with the same options). > > -- > John Baldwin