build-setup: Use flock to setup global configs
build-setup: Use flock to setup global configs

In case multiple jobs are started simultaneously (e.g. a matrix
configuration project), the setup script will get an error on writing
the config files, e.g. git config --global will fail with:

    error: could not lock config file

Use flock to make sure they are not accessing the file simultaneously.

Signed-off-by: Lei YU <fc52a17c06c071ee7cd115c972235443e2107013@bytedance.com>
Change-Id: Ida902593995739a1b5ae7164a29221ad18c914ac

openbmc/openbmc-build-scripts,openbmc/openbmc-build-scripts