[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Quilt-dev] [PATCH] Makefile.in: Fix "find -perm" usage
From: |
Jean Delvare |
Subject: |
Re: [Quilt-dev] [PATCH] Makefile.in: Fix "find -perm" usage |
Date: |
Thu, 23 May 2013 14:25:46 +0200 |
Le Thursday 23 May 2013 à 09:19 +0200, Jean Delvare a écrit :
> Le Wednesday 22 May 2013 à 13:49 +0400, Dmitry V. Levin a écrit :
> > > > -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.
>
> No, this may fail depending on the builder's umask.
>
> > Or maybe "-perm -0100" would be enough, I haven't seen the code.
>
> Yes, I think this is enough. We only care about the owner permission
> flags, the group/other permission flags may or may not be set depending
> on the builder's umask.
I have tested the following successfully. If everybody is fine with
this, I'll commit it:
Support for obsolete find -perm +MODE syntax was removed from GNU
findutils by commit
v4.5.10-144-g90f0c5d24153ad3327edd6f2249fc95a5cfb72e0.
Reported by Dmitry V. Levin.
Also -maxdepth is not portable and not needed so drop it.
---
Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/Makefile.in
+++ b/Makefile.in
@@ -274,7 +274,7 @@ Makefile : Makefile.in configure
@echo "Please run ./configure"
@false
-compat_leftover := $(filter-out $(COMPAT),$(shell $(FIND) compat -maxdepth 1
-type f -perm +111))
+compat_leftover := $(filter-out $(COMPAT),$(shell $(FIND) compat -type f -perm
-0100))
.PHONY :: compat
compat :: $(COMPAT)
--
Jean Delvare
Suse L3