From owner-freebsd-pkgbase@freebsd.org Mon Apr 13 18:56:22 2020 Return-Path: Delivered-To: freebsd-pkgbase@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4AE892C6223 for ; Mon, 13 Apr 2020 18:56:22 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 491Hs11yM3z434P for ; Mon, 13 Apr 2020 18:56:20 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 03DIuCSs032903; Mon, 13 Apr 2020 11:56:12 -0700 (PDT) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: (from freebsd-rwg@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 03DIuCsQ032902; Mon, 13 Apr 2020 11:56:12 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <202004131856.03DIuCsQ032902@gndrsh.dnsmgr.net> Subject: Re: /root on a separate dataset breaks FreeBSD-base installation In-Reply-To: <26892bda-635b-0d24-0534-ffc218815399@gjunka.com> To: Grzegorz Junka Date: Mon, 13 Apr 2020 11:56:12 -0700 (PDT) CC: "Rodney W. Grimes" , freebsd-pkgbase@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 491Hs11yM3z434P X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd-rwg@gndrsh.dnsmgr.net has no SPF policy when checking 69.59.192.140) smtp.mailfrom=freebsd-rwg@gndrsh.dnsmgr.net X-Spamd-Result: default: False [1.03 / 15.00]; ARC_NA(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[dnsmgr.net]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.27)[0.273,0]; NEURAL_HAM_LONG(-0.17)[-0.174,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(0.03)[ip: (0.13), ipnet: 69.59.192.0/19(0.06), asn: 13868(0.03), country: US(-0.05)]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-pkgbase@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Packaging the FreeBSD base system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Apr 2020 18:56:22 -0000 > > > Here we disagree, I consider /root very much a part of the base > > system and it should be pretty much unused. And I am a person > > that logs in as root and su -'s out to user accounts, but I > > still do not use /root as a normal home directory, everything > > else is done and stored some other place. > > > Do you see /root as part of the base here > https://svnweb.freebsd.org/base/head/ ? ;-) Yes, at a few places, that pkg base has majorly moved stuff around and I am not going to hunt for it but etc/Makefile and etc/mtree/BSD.root.dist. ${DESTDIR}/root is created and populated during a make distribution. > > Also look here https://www.freebsd.org/doc/handbook/jails-application.html > > /root is treated as editable part of the read-only base system, the same > way as /home editable != seperate vfs or zfs dataset. Try it, I suspect the jail create fails with the same error that it can not cross link the files. > > The fact that it is shipped with the base system, created by the > > base system installer, and is pretty much a mandatory required directoy, > > however does make it very much part of the base system. > > > We actually don't argue here if /root is part of a base system but if > it's reasonable for the installer to assume that /root is on the same > dataset as /. It is totally reasonable for it to assume that since the contents of / and /root are shipped in one tar ball, base.txz. > Based on the links I mentioned above, and on your comment, my > understanding is that /root is not part of the base system but it's > created and populated by the installer when installing the base. Yo have miss undertood my comments then. It is populated by the installer when it extracts base.txz. > Is the > requirement that the /root dataset should be on the same dataset as / > mentioned anywhere in the official documentation? I couldn't find it > here > > but it's also hard to search for due to root being a very common word in > various contexts. Certainly bsdinstall doesn't require /root to be on > the same dataset as /. Loack of documentation does not change the assumptions made by the base system. > > If indeed there is no such existing requirement, then it would be As it exists today "there is a requirement that /root and / be in the same filesystem." That requirement is why your getting an error. That requirement goes back to BSD 4.3 or earlier. > something new that pkgbase is introducing. Which might be fine, but is > it reasonable? This is not something new that pkg base has introduced, this requirement has existed for > 2 decades. > I don't think so. Regardless if /root should be > considered part of the base system or not, I don't see any reason for > pkgbase or the FreeBSD's base system to require /root to be on the same > dataset as / apart from those two hardlinks discussed earlier. Yep, it is those 2 hard links that create the requirement, and the reasons behind them being hard linked are rather practical, it is so that when/if the system fails to single user and HOME becomes / the user has the same environment that they would had root loged in, sans having to manual pick a shell. > > > >> It's home directory for the /root user, > >> where I often have larger files that I either copy to install or just as > >> a backup of some parts of the system. > > I would never store backup's in /root! > > > Backup may mean different things. I don't mean backups of the system. > Consider a tarball of the kernel copied from another system that needs > to be unpacked to / or temporary copies of some configs that are being > edited, e.g. pf.conf or rc.conf. Where would you store those? Probably in /tmp, maybe in ~rgrimes, but defanitly not in /root. > >> Versioning it per boot environment > >> wouldn't make sense. > > Double edge sword. The set of tweaks needed in .cshrc or .profile may > > vary by version of FreeBSD installed. > > > > Well, I would assume that an administrator is free to edit .cshrc and > .profile for their own needs, e.g. add aliases or env variables. Once > changed they would no longer be updated with the system but skipped. Actually I believe the update process, especially pkg base knows how to do 3 way merges of files marked as conf. > There are always reference versions in / which the administrator should > consult and copy over any required changes after the system has been > updated. The files in / are NOT seperate versions, they are a second pointer to the same file contents. Editing /.cshrc also changes /root/.cshrc. > GrzegorzJ -- Rod Grimes rgrimes@freebsd.org