[selinux-policy: 1286/3172] work around locale weirdness in FC that affects sort.

Daniel J Walsh dwalsh at fedoraproject.org
Thu Oct 7 20:56:20 UTC 2010


commit f62f4c798d1eb07af4c0fc9f9540e284d3d4f515
Author: Chris PeBenito <cpebenito at tresys.com>
Date:   Tue Mar 21 18:14:48 2006 +0000

    work around locale weirdness in FC that affects sort.

 refpolicy/Makefile         |    1 +
 refpolicy/Rules.modular    |    2 +-
 refpolicy/Rules.monolithic |    2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/refpolicy/Makefile b/refpolicy/Makefile
index dc43dc9..0e7054d 100644
--- a/refpolicy/Makefile
+++ b/refpolicy/Makefile
@@ -62,6 +62,7 @@ GREP ?= egrep
 M4 ?= m4
 PYTHON ?= python
 SED ?= sed
+SORT ?= LC_ALL=C sort
 
 CFLAGS += -Wall
 
diff --git a/refpolicy/Rules.modular b/refpolicy/Rules.modular
index 18ec40b..dc44893 100644
--- a/refpolicy/Rules.modular
+++ b/refpolicy/Rules.modular
@@ -166,7 +166,7 @@ $(TMPDIR)/post_te_files.conf: $(M4SUPPORT) $(BASE_POST_TE_FILES)
 # extract attributes and put them first. extract post te stuff
 # like genfscon and put last.
 $(TMPDIR)/all_attrs_types.conf $(TMPDIR)/only_te_rules.conf $(TMPDIR)/all_post.conf: $(TMPDIR)/all_te_files.conf $(TMPDIR)/post_te_files.conf
-	$(verbose) $(get_type_attr_decl) $(TMPDIR)/all_te_files.conf | sort > $(TMPDIR)/all_attrs_types.conf
+	$(verbose) $(get_type_attr_decl) $(TMPDIR)/all_te_files.conf | $(SORT) > $(TMPDIR)/all_attrs_types.conf
 	$(verbose) cat $(TMPDIR)/post_te_files.conf > $(TMPDIR)/all_post.conf
 # these have to run individually because order matters:
 	$(verbose) $(GREP) '^sid ' $(TMPDIR)/all_te_files.conf >> $(TMPDIR)/all_post.conf || true
diff --git a/refpolicy/Rules.monolithic b/refpolicy/Rules.monolithic
index fa8a9f9..b6aab0b 100644
--- a/refpolicy/Rules.monolithic
+++ b/refpolicy/Rules.monolithic
@@ -142,7 +142,7 @@ $(TMPDIR)/post_te_files.conf: $(M4SUPPORT) $(POST_TE_FILES)
 # extract attributes and put them first. extract post te stuff
 # like genfscon and put last.
 $(TMPDIR)/all_attrs_types.conf $(TMPDIR)/only_te_rules.conf $(TMPDIR)/all_post.conf: $(TMPDIR)/all_te_files.conf $(TMPDIR)/post_te_files.conf
-	$(verbose) $(get_type_attr_decl) $(TMPDIR)/all_te_files.conf | sort > $(TMPDIR)/all_attrs_types.conf
+	$(verbose) $(get_type_attr_decl) $(TMPDIR)/all_te_files.conf | $(SORT) > $(TMPDIR)/all_attrs_types.conf
 	$(verbose) cat $(TMPDIR)/post_te_files.conf > $(TMPDIR)/all_post.conf
 # these have to run individually because order matters:
 	$(verbose) $(GREP) '^sid ' $(TMPDIR)/all_te_files.conf >> $(TMPDIR)/all_post.conf || true


More information about the scm-commits mailing list