From 33ff79a9e59dc72428a9d4d94b01e00b8d0b8429 Mon Sep 17 00:00:00 2001 From: John Johansen Date: Wed, 26 Aug 2020 19:43:10 -0700 Subject: [PATCH] parser/Makefile: use LC_ALL=C when invoking sed Acked-by: Steve Beattie Acked-by: Seth Arnold MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/596 --- parser/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parser/Makefile b/parser/Makefile index 2641802cc..733ee26c6 100644 --- a/parser/Makefile +++ b/parser/Makefile @@ -289,12 +289,12 @@ generated_cap_names.h: /usr/include/linux/capability.h ../common/list_capabilities.sh | LC_ALL=C sed -n -e "s/[ \\t]\\?CAP_\\([A-Z0-9_]\\+\\)/\{\"\\L\\1\", \\UCAP_\\1, NO_BACKMAP_CAP, CAPFLAG_BASE_FEATURE\},\\n/pg" > $@ cap_names.h: generated_cap_names.h base_cap_names.h - @sed -e 's/CAP_[A-Z0-9_]\+}/NO_BACKMAP_CAP,/g' base_cap_names.h | diff -u - generated_cap_names.h | grep '^\+[^+]' ; \ + @LC_ALL=C sed -e 's/CAP_[A-Z0-9_]\+}/NO_BACKMAP_CAP,/g' base_cap_names.h | diff -u - generated_cap_names.h | grep '^\+[^+]' ; \ if [ $$? -eq 1 ] ; then \ cp base_cap_names.h $@ ; \ else \ echo "Error: new capabilities detected please update base_cap_names.h with values from generated_cap_names.h" ; \ - sed -e 's/CAP_[A-Z0-9_]\+}/NO_BACKMAP_CAP,/g' base_cap_names.h | diff -u - generated_cap_names.h ; \ + LC_ALL=C sed -e 's/CAP_[A-Z0-9_]\+}/NO_BACKMAP_CAP,/g' base_cap_names.h | diff -u - generated_cap_names.h ; \ exit 1; \ fi