* [PATCH] xsm/policy: remove gawk-ism line in Makefile
@ 2015-03-03 12:44 Wei Liu
2015-03-03 13:33 ` Ian Campbell
2015-03-03 15:16 ` Daniel De Graaf
0 siblings, 2 replies; 4+ messages in thread
From: Wei Liu @ 2015-03-03 12:44 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Jackson, Daniel De Graaf, Wei Liu, Ian Campbell
Translate gawk regex to mawk regex to allow using mawk. The new regex
works on both gawk and mawk.
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Daniel De Graaf <dgdegra@tycho.nsa.gov>
---
tools/flask/policy/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/flask/policy/Makefile b/tools/flask/policy/Makefile
index 54a845b..58d9ce1 100644
--- a/tools/flask/policy/Makefile
+++ b/tools/flask/policy/Makefile
@@ -86,7 +86,7 @@ DETECTED_MODS := $(sort $(foreach dir,$(ALL_LAYERS),$(wildcard $(dir)/*.te)))
MODENABLED := on
# extract settings from modules.conf
-ENABLED_MODS := $(foreach mod,$(shell awk '/^[[:blank:]]*[[:alpha:]]/{ if ($$3 == "$(MODENABLED)") print $$1 }' $(MOD_CONF) 2> /dev/null),$(subst ./,,$(shell find -iname $(mod).te)))
+ENABLED_MODS := $(foreach mod,$(shell awk '/^[ \t]*[a-z]/{ if ($$3 == "$(MODENABLED)") print $$1 }' $(MOD_CONF) 2> /dev/null),$(subst ./,,$(shell find -iname $(mod).te)))
ALL_MODULES := $(filter $(ENABLED_MODS),$(DETECTED_MODS))
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] xsm/policy: remove gawk-ism line in Makefile
2015-03-03 12:44 [PATCH] xsm/policy: remove gawk-ism line in Makefile Wei Liu
@ 2015-03-03 13:33 ` Ian Campbell
2015-03-03 15:16 ` Daniel De Graaf
1 sibling, 0 replies; 4+ messages in thread
From: Ian Campbell @ 2015-03-03 13:33 UTC (permalink / raw)
To: Wei Liu; +Cc: Daniel De Graaf, Ian Jackson, xen-devel
On Tue, 2015-03-03 at 12:44 +0000, Wei Liu wrote:
> Translate gawk regex to mawk regex to allow using mawk. The new regex
> works on both gawk and mawk.
I think [[:alpha:]] might include A-Z too, but I presume that doesn't
affect our inputs or your tests would have failed. So for my part:
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Daniel De Graaf <dgdegra@tycho.nsa.gov>
> ---
> tools/flask/policy/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/flask/policy/Makefile b/tools/flask/policy/Makefile
> index 54a845b..58d9ce1 100644
> --- a/tools/flask/policy/Makefile
> +++ b/tools/flask/policy/Makefile
> @@ -86,7 +86,7 @@ DETECTED_MODS := $(sort $(foreach dir,$(ALL_LAYERS),$(wildcard $(dir)/*.te)))
> MODENABLED := on
>
> # extract settings from modules.conf
> -ENABLED_MODS := $(foreach mod,$(shell awk '/^[[:blank:]]*[[:alpha:]]/{ if ($$3 == "$(MODENABLED)") print $$1 }' $(MOD_CONF) 2> /dev/null),$(subst ./,,$(shell find -iname $(mod).te)))
> +ENABLED_MODS := $(foreach mod,$(shell awk '/^[ \t]*[a-z]/{ if ($$3 == "$(MODENABLED)") print $$1 }' $(MOD_CONF) 2> /dev/null),$(subst ./,,$(shell find -iname $(mod).te)))
>
> ALL_MODULES := $(filter $(ENABLED_MODS),$(DETECTED_MODS))
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] xsm/policy: remove gawk-ism line in Makefile
2015-03-03 12:44 [PATCH] xsm/policy: remove gawk-ism line in Makefile Wei Liu
2015-03-03 13:33 ` Ian Campbell
@ 2015-03-03 15:16 ` Daniel De Graaf
2015-03-05 17:28 ` Ian Campbell
1 sibling, 1 reply; 4+ messages in thread
From: Daniel De Graaf @ 2015-03-03 15:16 UTC (permalink / raw)
To: Wei Liu, xen-devel; +Cc: Ian Jackson, Ian Campbell
On 03/03/2015 07:44 AM, Wei Liu wrote:
> Translate gawk regex to mawk regex to allow using mawk. The new regex
> works on both gawk and mawk.
>
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] xsm/policy: remove gawk-ism line in Makefile
2015-03-03 15:16 ` Daniel De Graaf
@ 2015-03-05 17:28 ` Ian Campbell
0 siblings, 0 replies; 4+ messages in thread
From: Ian Campbell @ 2015-03-05 17:28 UTC (permalink / raw)
To: Daniel De Graaf; +Cc: Ian Jackson, Wei Liu, xen-devel
On Tue, 2015-03-03 at 10:16 -0500, Daniel De Graaf wrote:
> On 03/03/2015 07:44 AM, Wei Liu wrote:
> > Translate gawk regex to mawk regex to allow using mawk. The new regex
> > works on both gawk and mawk.
> >
> > Signed-off-by: Wei Liu <wei.liu2@citrix.com>
>
> Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-03-05 17:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-03 12:44 [PATCH] xsm/policy: remove gawk-ism line in Makefile Wei Liu
2015-03-03 13:33 ` Ian Campbell
2015-03-03 15:16 ` Daniel De Graaf
2015-03-05 17:28 ` Ian Campbell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.