From owner-svn-src-all@freebsd.org Mon Mar 5 17:32:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68DB8F41F63; Mon, 5 Mar 2018 17:32:32 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 102908536B; Mon, 5 Mar 2018 17:32:32 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id D4F8A1ECC7; Mon, 5 Mar 2018 17:32:31 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id CC45A12CE; Mon, 5 Mar 2018 17:32:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id nDIqjrWiShoK; Mon, 5 Mar 2018 17:32:28 +0000 (UTC) Subject: Re: svn commit: r330436 - head/bin/chflags DKIM-Filter: OpenDKIM Filter v2.10.3 mail.xzibition.com F20A612C7 From: Bryan Drewery To: Bruce Evans , Ian Lepore Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201803050156.w251u7Y8020941@repo.freebsd.org> <1520215860.38056.3.camel@freebsd.org> <20180305140228.P935@besplex.bde.org> Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <8a8cd29b-9936-6d23-4e2b-4c646eca6aba@FreeBSD.org> Date: Mon, 5 Mar 2018 09:32:29 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3wTtYlb06OSDXKKVpMTEWxCYNc6tcWPUi" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 17:32:32 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --3wTtYlb06OSDXKKVpMTEWxCYNc6tcWPUi Content-Type: multipart/mixed; boundary="X5VoSTSGGBACKRZqY0WzRvrcvy6RCefaO"; protected-headers="v1" From: Bryan Drewery To: Bruce Evans , Ian Lepore 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> In-Reply-To: --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--