Blame SOURCES/0109-fix-test-only-set-locale-if-C.utf8-is-available.patch

c8bceb
From c623eeccd0cbd1cf59065d4a63a3cf760f12e43a Mon Sep 17 00:00:00 2001
c8bceb
From: Eric Garver <eric@garver.life>
c8bceb
Date: Thu, 26 Sep 2019 15:28:20 -0400
c8bceb
Subject: [PATCH 109/109] fix: test: only set locale if C.utf8 is available
c8bceb
c8bceb
If it's not available, just roll with what's already set in the
c8bceb
environment and hope for the best. This fixes warnings on distros that
c8bceb
may not provide C.UTF-8.
c8bceb
c8bceb
(cherry picked from commit 933adbeb526d97855abc9644d2d93b3364efc7eb)
c8bceb
(cherry picked from commit 07a5378d33fd37f6ef375300fabcf7eea4f78801)
c8bceb
---
c8bceb
 src/tests/functions.at | 8 ++++----
c8bceb
 1 file changed, 4 insertions(+), 4 deletions(-)
c8bceb
c8bceb
diff --git a/src/tests/functions.at b/src/tests/functions.at
c8bceb
index 125a6e06ce6b..013ec098052c 100644
c8bceb
--- a/src/tests/functions.at
c8bceb
+++ b/src/tests/functions.at
c8bceb
@@ -52,10 +52,10 @@ m4_define([FWD_START_TEST], [
c8bceb
 
c8bceb
     dnl We test some unicode strings and autotest overrides LC_ALL=C, so set it
c8bceb
     dnl again for every test.
c8bceb
-    LC_ALL="C.UTF-8"
c8bceb
-    export LC_ALL
c8bceb
-    LANGUAGE="C.UTF-8"
c8bceb
-    export LANGUAGE
c8bceb
+    if locale -a |grep "^C.utf8" >/dev/null; then
c8bceb
+        LC_ALL="C.UTF-8"
c8bceb
+        export LC_ALL
c8bceb
+    fi
c8bceb
 
c8bceb
     dnl start every test with the default config
c8bceb
     if test "x${FIREWALLD_DEFAULT_CONFIG}" != x ; then
c8bceb
-- 
c8bceb
2.20.1
c8bceb