quilt-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Quilt-dev] [PATCH] Makefile.in: Fix "find -perm" usage


From: Dmitry V. Levin
Subject: Re: [Quilt-dev] [PATCH] Makefile.in: Fix "find -perm" usage
Date: Wed, 22 May 2013 13:49:32 +0400

On Wed, May 22, 2013 at 01:47:21AM +0200, Martin Quinson wrote:
> Do you have any information on the portability of this new syntax? In
> praticular, since when is it in GNU findutils, and what's the support
> of this syntax on non-GNU systems? BSD ones come to mind.
> 
> Thanks for your time, Mt

Some portability facts about find:
1. "-perm /MODE" is a GNU extention, but may be implemented elsewhere,
  too;
2. "-perm +MODE" and "-perm /MODE" have different meaning, .e.g.
  "-perm +x" means "-perm =x";
3. "-perm +OCTAL" is not specified by POSIX and removed from GNU
  findutils, to avoid confusion.

For more information about this issue, see
http://lists.gnu.org/archive/html/bug-findutils/2013-04/msg00017.html

[...]
> > -compat_leftover := $(filter-out $(COMPAT),$(shell $(FIND) compat -maxdepth 
> > 1 -type f -perm +111))
> > +compat_leftover := $(filter-out $(COMPAT),$(shell $(FIND) compat -maxdepth 
> > 1 -type f -perm /111))

If "-perm -0111" would suffice, that would be quite portable.
Or maybe "-perm -0100" would be enough, I haven't seen the code.
If not, the portable equivalent of "-perm /111" is
"( -perm -0100 -o -perm -0010 -o -perm -0001 )"


-- 
ldv

Attachment: pgpIKcTEUaiJJ.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]