summaryrefslogtreecommitdiff
path: root/lib/fuzzing
diff options
context:
space:
mode:
authorSamuel Cabrero <scabrero@suse.de>2021-03-30 16:17:31 +0200
committerSamuel Cabrero <scabrero@sn-devel-184>2021-04-06 15:54:54 +0000
commit49a0f6170bf6b914bb7d513664c6cfc6b3864bb5 (patch)
treebf9dc5d700ffa51a5048f65eb24c9ca7295154ec /lib/fuzzing
parent11aac9d0433ab59740c40712c3782f1cf4ac0418 (diff)
downloadsamba-49a0f6170bf6b914bb7d513664c6cfc6b3864bb5.tar.gz
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 <scabrero@samba.org> Reviewed-by: David Mulder <dmulder@samba.org> Autobuild-User(master): Samuel Cabrero <scabrero@samba.org> Autobuild-Date(master): Tue Apr 6 15:54:54 UTC 2021 on sn-devel-184
Diffstat (limited to 'lib/fuzzing')
-rwxr-xr-xlib/fuzzing/oss-fuzz/do_build.sh6
1 files changed, 5 insertions, 1 deletions
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