oss-fuzz: Ensure a UTF8 locale is set for the samba build
authorAndrew Bartlett <abartlet@samba.org>
Wed, 26 Aug 2020 00:50:00 +0000 (12:50 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 26 Aug 2020 03:20:45 +0000 (03:20 +0000)
This ensures that LANG=en_US.UTF8 is set, which
Samba's build system needs to operate in UTF8 mode.

The change to use flex to generate code meant that this
difference between GitLab CI and oss-fuzz was exposed.

REF: https://github.com/google/oss-fuzz/pull/4366

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Aug 26 03:20:46 UTC 2020 on sn-devel-184

lib/fuzzing/oss-fuzz/build_samba.sh

index f798f8feb6a57e352ec3cad01360c8617e5d0614..333e8c385610e1e4a9b40ced14fd0be6de2244f2 100755 (executable)
@@ -21,6 +21,12 @@ set -e
 set -x
 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
+export LANG
+export LC_ALL
+
 ADDITIONAL_CFLAGS="$CFLAGS"
 export ADDITIONAL_CFLAGS
 CFLAGS=""