2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-30 22:05:27 +00:00

parser/Makefile: use LC_ALL=C when invoking sed

Acked-by: Steve Beattie <steve.beattie@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/596
This commit is contained in:
John Johansen
2020-08-26 19:43:10 -07:00
committed by Steve Beattie
parent 9ef98e89e4
commit 33ff79a9e5

View File

@@ -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