Date: Mon, 5 Mar 2018 09:32:29 -0800 From: Bryan Drewery <bdrewery@FreeBSD.org> To: Bruce Evans <brde@optusnet.com.au>, Ian Lepore <ian@freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r330436 - head/bin/chflags Message-ID: <8a8cd29b-9936-6d23-4e2b-4c646eca6aba@FreeBSD.org> In-Reply-To: <a49d3beb-9780-4b3d-03e6-b9ccb77baab9@FreeBSD.org> References: <201803050156.w251u7Y8020941@repo.freebsd.org> <1520215860.38056.3.camel@freebsd.org> <20180305140228.P935@besplex.bde.org> <a49d3beb-9780-4b3d-03e6-b9ccb77baab9@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --3wTtYlb06OSDXKKVpMTEWxCYNc6tcWPUi Content-Type: multipart/mixed; boundary="X5VoSTSGGBACKRZqY0WzRvrcvy6RCefaO"; protected-headers="v1" From: Bryan Drewery <bdrewery@FreeBSD.org> To: Bruce Evans <brde@optusnet.com.au>, Ian Lepore <ian@freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <8a8cd29b-9936-6d23-4e2b-4c646eca6aba@FreeBSD.org> Subject: Re: svn commit: r330436 - head/bin/chflags References: <201803050156.w251u7Y8020941@repo.freebsd.org> <1520215860.38056.3.camel@freebsd.org> <20180305140228.P935@besplex.bde.org> <a49d3beb-9780-4b3d-03e6-b9ccb77baab9@FreeBSD.org> In-Reply-To: <a49d3beb-9780-4b3d-03e6-b9ccb77baab9@FreeBSD.org> --X5VoSTSGGBACKRZqY0WzRvrcvy6RCefaO Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 3/5/2018 8:37 AM, Bryan Drewery wrote: > On 3/4/2018 8:30 PM, Bruce Evans wrote: >> On Sun, 4 Mar 2018, Ian Lepore wrote: >> >>> On Mon, 2018-03-05 at 01:56 +0000, Bryan Drewery wrote: >>>> >>>> Log: >>>> \xa0 chflags: Add -x option to not traverse mount points. >>> >>> Yay! \xa0One day later than I needed it, but still, yay! >> >> I recently noticed that find(1) needs an option to not look at mount >> points at all, and further options to classify mount points so that >> you can prune them. >> >> After reading the above and investigating further, I noticed that -x >> is broken in most FreeBSD utilities, since POSIX requires not looking >> at mount points at all for the few utilities that support -x.=C2=A0 E.= g., >> for du in 2001 draft 7 POSIX: >> >> 12578=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= -x=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Whe= n evaluating file sizes, evaluate only >> those files that have the same device as >> 12579=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 the file specified by the file operand. >> 12580=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= Specifying more than one of the mutually-exclusive >> options -H and -L shall not be considered >=20 > Yes I'm quite annoyed that my workaround for chflags not having -x, > using `find -x ... -exec chflags`, is still trying to modify mountpoint= s > but not descending into them. >=20 Note of course my chflags change suffers the same problem of course since it's just using FTS (these are null-mounted read-only or devfs/procfs paths): > # /scratch/obj/root/git/freebsd/amd64.amd64/bin/chflags/chflags.full -R= x schg /poudriere/data/.m/exp-11amd64-commit-test/ref > chflags.full: /poudriere/data/.m/exp-11amd64-commit-test/ref/distfiles:= Operation not supported > chflags.full: /poudriere/data/.m/exp-11amd64-commit-test/ref/compat/lin= ux/proc: Operation not supported > chflags.full: /poudriere/data/.m/exp-11amd64-commit-test/ref/proc: Oper= ation not supported > chflags.full: /poudriere/data/.m/exp-11amd64-commit-test/ref/dev: Inval= id argument > chflags.full: /poudriere/data/.m/exp-11amd64-commit-test/ref/rescue: Re= ad-only file system > chflags.full: /poudriere/data/.m/exp-11amd64-commit-test/ref/usr/tests:= Read-only file system > chflags.full: /poudriere/data/.m/exp-11amd64-commit-test/ref/usr/share:= Read-only file system > chflags.full: /poudriere/data/.m/exp-11amd64-commit-test/ref/usr/ports:= Read-only file system > chflags.full: /poudriere/data/.m/exp-11amd64-commit-test/ref/usr/src: R= ead-only file system > chflags.full: /poudriere/data/.m/exp-11amd64-commit-test/ref/packages: = Read-only file system Personally I find this behavior surprising and wrong and think all of the tools -x[dev] behavior should not interact with these paths either by default or with an option. >> >> Mount points are on a different device, but FreeBSD du -x is broken by= >> using FTS_XDEV and not filtering out the mount points. Linux du -x >> (an old version in /compat/linyx/usr/bin) works correctly. >=20 >=20 --=20 Regards, Bryan Drewery --X5VoSTSGGBACKRZqY0WzRvrcvy6RCefaO-- --3wTtYlb06OSDXKKVpMTEWxCYNc6tcWPUi Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJanX8tAAoJEDXXcbtuRpfPB70H/im82x6xxvceGRXWtmJ18ssL 5DsIHjgwIjpulBoJHdgW6Liewj3S5BQ+4DkQDmHHPckId9xMehXapwhY289Q48Tc uJTpkUItKOYMRpgCuMOusCtNLsukwcRyRNOzyY3U6O/iiEMxQsCp613jhTX9HB9+ YNkvq7uhw3Xmvrv701hUxEqRe1PFVikZ2Lqx/rqARt0Qe7N69XdK+k40UT0pnVrX AJzhrBMqskYpFBD7cAndHIm2H7uoAjXu/EoV2co7LHZBa8aaJSiwyp9f2mryYw83 UPo3rDTDSmm2SkHBUjg8tiy4RL2usIgSirggMk0q+os8B2LVSviqZRhtSQuMrYk= =vpAc -----END PGP SIGNATURE----- --3wTtYlb06OSDXKKVpMTEWxCYNc6tcWPUi--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8a8cd29b-9936-6d23-4e2b-4c646eca6aba>