From owner-freebsd-pkgbase@freebsd.org Sun Apr 12 00:35:38 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 593A02A857F for ; Sun, 12 Apr 2020 00:35:38 +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 490CTP3V3Qz4Kwh for ; Sun, 12 Apr 2020 00:35:36 +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 03C0ZVCK025046; Sat, 11 Apr 2020 17:35:31 -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 03C0ZUTB025045; Sat, 11 Apr 2020 17:35:30 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <202004120035.03C0ZUTB025045@gndrsh.dnsmgr.net> Subject: Re: /root on a separate dataset breaks FreeBSD-base installation In-Reply-To: To: Grzegorz Junka Date: Sat, 11 Apr 2020 17:35:30 -0700 (PDT) CC: "Rodney W. Grimes" , Emmanuel Vadot , 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: 490CTP3V3Qz4Kwh 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.09 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.02)[-0.020,0]; RCPT_COUNT_THREE(0.00)[4]; 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)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.18)[0.175,0]; 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: Sun, 12 Apr 2020 00:35:38 -0000 > On 11/04/2020 17:03, Rodney W. Grimes wrote: > >> On Sat, 11 Apr 2020 09:42:49 -0700 (PDT) > >> "Rodney W. Grimes" wrote: > >> > >>> [ Charset UTF-8 unsupported, converting... ] > >>>> I am following https://wiki.freebsd.org/PkgBase > >>>> > >>>> This: > >>>> > >>>> pkg install -g 'FreeBSD-*' > >>>> > >>>> fails with this: > >>>> > >>>> [2/800] Extracting FreeBSD-runtime-12.1_3:?? 4% > >>>> pkg: Fail to create hardlink: > >>>> /root/.pkgtemp..cshrc.v5sxGCRu3GlP:Cross-device link > >>> ^^^^^^ > >>> > >>> > >>>> [2/800] Extracting FreeBSD-runtime-12.1_3: 100% > >>>> > >>>> /root is in a different ZFS dataset. It works fine if it's not. Why pkg > >>>> is using /root/.pkgtemp instead of /tmp or /var/tmp? It doesn't matter > >>>> from where I run the command, looks like the path is hardcoded. > >>> The failure is caused by the fact that /.cshrc and /root/.cshrc > >>> are hardlinked to each other. A hardlink can not cross a > >>> ZFS dataset or a ufs mount point. > >> Ah right. > >> > >>>> Can I workaround with some option to pkg? > >>> I doubt that. > >> Someone (tm) should add support for this in pkg. > > An option to convert hardlinks to symlinks or duplicate files could be done. > > > > For the person with this problem there are ways to work around it > > by not making /root a seperate dataset, create /toor data set, > > set toor login home to /toor, use that for what ever it is that > > made you feel you needed to have /root as its own data set. > > > Did you mean - set root login home to /toor? Or create a new toor user? Look in your /etc/passwd file, the toor user already exists, its normal use is for /bin/sh login to root, but it can still be used for your issue here. > > I think the same will be with .profile which also looks like it's > hardlinked. Yes, but the pkg system is ONLY going to mess with /root, if you use /toor for your purpose it wont mess with pkg. However, you well have to update things from /root to /toor manually, but that rate of change is very very small. > > Wouldn't pkg already have to handle this for normal port packages > somehow? Or they never create hardlinks? Is it worth raising bug/feature > in bugzilla for pkg? The norm is there are very few cross directory links and this is very rarely an issue unless someone modifies the system in a way outside of the norm. Having /root as a seperate dataset is outside the norm. Note this also places /root outside of the boot environment directory which may bring other issues in the future. Ports should all install stuff inder the /usr/local hierarchy and that is usually self contained, so hard links are not an issue there. Further note, if you have made /usr/local its own dataset your defanitly going to have issues with boot environments if you try to run more than 1 version of FreeBSD as /usr/local is pretty version dependent. /var is a whole nother crap mess with boot environments, pkg and multiple versions cause pkg stores its caches and databases in /var and /var is not part of the BE. > --GrzegorzJ -- Rod Grimes rgrimes@freebsd.org From owner-freebsd-pkgbase@freebsd.org Sun Apr 12 11:32:58 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 4E77F2BAF21 for ; Sun, 12 Apr 2020 11:32:58 +0000 (UTC) (envelope-from list1@gjunka.com) Received: from msa1.earth.yoonka.com (yoonka.com [88.98.225.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "msa1.earth.yoonka.com", Issuer "msa1.earth.yoonka.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 490V3s0F37z41SZ for ; Sun, 12 Apr 2020 11:32:56 +0000 (UTC) (envelope-from list1@gjunka.com) Received: from crayon2.yoonka.com (crayon2.yoonka.com [10.70.7.20]) (authenticated bits=0) by msa1.earth.yoonka.com (8.15.2/8.15.2) with ESMTPSA id 03CBWsNZ000814 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Sun, 12 Apr 2020 11:32:54 GMT (envelope-from list1@gjunka.com) Subject: Re: /root on a separate dataset breaks FreeBSD-base installation To: "Rodney W. Grimes" Cc: freebsd-pkgbase@freebsd.org References: <202004120035.03C0ZUTB025045@gndrsh.dnsmgr.net> From: Grzegorz Junka Message-ID: <90ddb61f-4bac-b000-0ba6-4fe0c485d45e@gjunka.com> Date: Sun, 12 Apr 2020 11:32:54 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <202004120035.03C0ZUTB025045@gndrsh.dnsmgr.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Rspamd-Queue-Id: 490V3s0F37z41SZ X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of list1@gjunka.com designates 88.98.225.149 as permitted sender) smtp.mailfrom=list1@gjunka.com X-Spamd-Result: default: False [-5.86 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:88.98.225.149]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[gjunka.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; IP_SCORE(-3.56)[ip: (-9.34), ipnet: 88.98.192.0/18(-4.67), asn: 56478(-3.74), country: GB(-0.07)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:56478, ipnet:88.98.192.0/18, country:GB]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; 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: Sun, 12 Apr 2020 11:32:58 -0000 > The norm is there are very few cross directory links and > this is very rarely an issue unless someone modifies the > system in a way outside of the norm. Having /root as a > seperate dataset is outside the norm. Note this also > places /root outside of the boot environment directory > which may bring other issues in the future. > > Ports should all install stuff inder the /usr/local hierarchy > and that is usually self contained, so hard links are not > an issue there. > > Further note, if you have made /usr/local its own dataset > your defanitly going to have issues with boot environments > if you try to run more than 1 version of FreeBSD as /usr/local > is pretty version dependent. > > /var is a whole nother crap mess with boot environments, > pkg and multiple versions cause pkg stores its caches > and databases in /var and /var is not part of the BE. That's exactly my thinking. Boot environments might work for servers where there are very few packages installed on host directly and the host is usually running dedicated jails. But it's another story on a desktop where the system and all packages take 17GB. I don't want to be reinstalling everything manually whenever I upgrade the base system and I don't want to deal with pkg having to work across multiple boot environments. For desktop my preference is to keep one copy of /usr/local, var, tmp, root, home, and so on, so essentially just have the base system and basic configuration versioned in the boot environment. Sure, some packages won't work properly, but that's easy to fix. I build them with newer base on another system then reinstall all of them on the desktop. I don't consider /root as part of the base system. A hardlink doesn't make it part of a base system. 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. Versioning it per boot environment wouldn't make sense. --GrzegorzJ From owner-freebsd-pkgbase@freebsd.org Sun Apr 12 11:43:13 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 9F5CF2BB184 for ; Sun, 12 Apr 2020 11:43:13 +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 490VHg6z0hz41mk for ; Sun, 12 Apr 2020 11:43:11 +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 03CBh3fa027011; Sun, 12 Apr 2020 04:43:03 -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 03CBh3s3027010; Sun, 12 Apr 2020 04:43:03 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <202004121143.03CBh3s3027010@gndrsh.dnsmgr.net> Subject: Re: /root on a separate dataset breaks FreeBSD-base installation In-Reply-To: <90ddb61f-4bac-b000-0ba6-4fe0c485d45e@gjunka.com> To: Grzegorz Junka Date: Sun, 12 Apr 2020 04:43:03 -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: 490VHg6z0hz41mk 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 [0.16 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.31)[-0.314,0]; 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_HAM_LONG(-0.46)[-0.460,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: Sun, 12 Apr 2020 11:43:13 -0000 > > The norm is there are very few cross directory links and > > this is very rarely an issue unless someone modifies the > > system in a way outside of the norm. Having /root as a > > seperate dataset is outside the norm. Note this also > > places /root outside of the boot environment directory > > which may bring other issues in the future. > > > > Ports should all install stuff inder the /usr/local hierarchy > > and that is usually self contained, so hard links are not > > an issue there. > > > > Further note, if you have made /usr/local its own dataset > > your defanitly going to have issues with boot environments > > if you try to run more than 1 version of FreeBSD as /usr/local > > is pretty version dependent. > > > > /var is a whole nother crap mess with boot environments, > > pkg and multiple versions cause pkg stores its caches > > and databases in /var and /var is not part of the BE. > > > That's exactly my thinking. Boot environments might work for servers > where there are very few packages installed on host directly and the > host is usually running dedicated jails. But it's another story on a > desktop where the system and all packages take 17GB. I don't want to be > reinstalling everything manually whenever I upgrade the base system and > I don't want to deal with pkg having to work across multiple boot > environments. > > For desktop my preference is to keep one copy of /usr/local, var, tmp, > root, home, and so on, so essentially just have the base system and > basic configuration versioned in the boot environment. Sure, some > packages won't work properly, but that's easy to fix. I build them with > newer base on another system then reinstall all of them on the desktop. > > I don't consider /root as part of the base system. 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 understand you can have more than 1 uid 0 account on a system :-) > A hardlink doesn't > make it part of a base system. 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. > 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! > 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. > --GrzegorzJ -- Rod Grimes rgrimes@freebsd.org From owner-freebsd-pkgbase@freebsd.org Mon Apr 13 12:46:19 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 688C12BDAA6 for ; Mon, 13 Apr 2020 12:46:19 +0000 (UTC) (envelope-from list1@gjunka.com) Received: from msa1.earth.yoonka.com (yoonka.com [88.98.225.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "msa1.earth.yoonka.com", Issuer "msa1.earth.yoonka.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4917f23BTnz4Ymf for ; Mon, 13 Apr 2020 12:46:17 +0000 (UTC) (envelope-from list1@gjunka.com) Received: from crayon2.yoonka.com (crayon2.yoonka.com [10.70.7.20]) (authenticated bits=0) by msa1.earth.yoonka.com (8.15.2/8.15.2) with ESMTPSA id 03DCkFWW024954 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Mon, 13 Apr 2020 12:46:16 GMT (envelope-from list1@gjunka.com) Subject: Re: /root on a separate dataset breaks FreeBSD-base installation To: "Rodney W. Grimes" Cc: freebsd-pkgbase@freebsd.org References: <202004121143.03CBh3s3027010@gndrsh.dnsmgr.net> From: Grzegorz Junka Message-ID: <26892bda-635b-0d24-0534-ffc218815399@gjunka.com> Date: Mon, 13 Apr 2020 12:46:15 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <202004121143.03CBh3s3027010@gndrsh.dnsmgr.net> Content-Language: en-US X-Rspamd-Queue-Id: 4917f23BTnz4Ymf X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of list1@gjunka.com designates 88.98.225.149 as permitted sender) smtp.mailfrom=list1@gjunka.com X-Spamd-Result: default: False [-5.87 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:88.98.225.149:c]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[gjunka.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; IP_SCORE(-3.57)[ip: (-9.35), ipnet: 88.98.192.0/18(-4.67), asn: 56478(-3.74), country: GB(-0.07)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:56478, ipnet:88.98.192.0/18, country:GB]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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 12:46:19 -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/ ? ;-) 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 > 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 /. 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. 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 /. If indeed there is no such existing requirement, then it would be something new that pkgbase is introducing. Which might be fine, but is it reasonable? 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. >> 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? >> 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. There are always reference versions in / which the administrator should consult and copy over any required changes after the system has been updated. -- GrzegorzJ 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 From owner-freebsd-pkgbase@freebsd.org Tue Apr 14 13:16:43 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 3A7FD2C071A for ; Tue, 14 Apr 2020 13:16:43 +0000 (UTC) (envelope-from list1@gjunka.com) Received: from msa1.earth.yoonka.com (yoonka.com [88.98.225.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "msa1.earth.yoonka.com", Issuer "msa1.earth.yoonka.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 491mGd6Qsnz4BMH for ; Tue, 14 Apr 2020 13:16:41 +0000 (UTC) (envelope-from list1@gjunka.com) Received: from crayon2.yoonka.com (crayon2.yoonka.com [10.70.7.20]) (authenticated bits=0) by msa1.earth.yoonka.com (8.15.2/8.15.2) with ESMTPSA id 03EDGeDw048622 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Tue, 14 Apr 2020 13:16:40 GMT (envelope-from list1@gjunka.com) Subject: Re: /root on a separate dataset breaks FreeBSD-base installation To: "Rodney W. Grimes" Cc: freebsd-pkgbase@freebsd.org References: <202004131856.03DIuCsQ032902@gndrsh.dnsmgr.net> From: Grzegorz Junka Message-ID: <4ee7d986-79ba-cae4-fc52-875e3de6d39d@gjunka.com> Date: Tue, 14 Apr 2020 13:16:40 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <202004131856.03DIuCsQ032902@gndrsh.dnsmgr.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Rspamd-Queue-Id: 491mGd6Qsnz4BMH X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of list1@gjunka.com designates 88.98.225.149 as permitted sender) smtp.mailfrom=list1@gjunka.com X-Spamd-Result: default: False [-5.87 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:88.98.225.149:c]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[gjunka.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; IP_SCORE(-3.57)[ip: (-9.35), ipnet: 88.98.192.0/18(-4.68), asn: 56478(-3.74), country: GB(-0.07)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:56478, ipnet:88.98.192.0/18, country:GB]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; 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: Tue, 14 Apr 2020 13:16:43 -0000 Many thanks for the detailed explanation. I will assume that /root has to be on the same dataset as / and workaround any issues. I might test at some point if bsdinstall is able to unpack the base system in a jail if they are not on the same dataset when I get a chance just out of curiosity. GrzegorzJ On 13/04/2020 18:56, Rodney W. Grimes wrote: >>> 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