]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
oss-fuzz: Update build script to be compatible with rpm distros
authorSamuel Cabrero <scabrero@suse.de>
Tue, 30 Mar 2021 14:17:31 +0000 (16:17 +0200)
committerSamuel Cabrero <scabrero@sn-devel-184>
Tue, 6 Apr 2021 15:54:54 +0000 (15:54 +0000)
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

lib/fuzzing/oss-fuzz/do_build.sh

index f1f830ec34ce4329b201bc87dc975dc43c565fe2..4c6796d235053c1d7dc26d280ba5a72916144c42 100755 (executable)
@@ -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