From 49a0f6170bf6b914bb7d513664c6cfc6b3864bb5 Mon Sep 17 00:00:00 2001 From: Samuel Cabrero Date: Tue, 30 Mar 2021 16:17:31 +0200 Subject: [PATCH] oss-fuzz: Update build script to be compatible with rpm distros The /etc/default/locale file does not exists in the rpm family distros so the do_build.sh script failed with: ./lib/fuzzing/oss-fuzz/do_build.sh: line 31: /etc/default/locale: No such file or directory Signed-off-by: Samuel Cabrero Reviewed-by: David Mulder Autobuild-User(master): Samuel Cabrero Autobuild-Date(master): Tue Apr 6 15:54:54 UTC 2021 on sn-devel-184 --- lib/fuzzing/oss-fuzz/do_build.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/fuzzing/oss-fuzz/do_build.sh b/lib/fuzzing/oss-fuzz/do_build.sh index f1f830ec34c..4c6796d2350 100755 --- a/lib/fuzzing/oss-fuzz/do_build.sh +++ b/lib/fuzzing/oss-fuzz/do_build.sh @@ -28,7 +28,11 @@ set -u # It is critical that this script, just as the rest of Samba's GitLab # CI docker has LANG set to en_US.utf8 (oss-fuzz fails to set this) -. /etc/default/locale +if [ -f /etc/default/locale ]; then + . /etc/default/locale +elif [ -f /etc/locale.conf ]; then + . /etc/locale.conf +fi export LANG export LC_ALL