David Hendricks (dhendrix@chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7132
-gerrit
commit f854e305d405e77ed97db007d987382242cb3034 Author: David Hendricks dhendrix@chromium.org Date: Sun Oct 19 02:30:49 2014 -0700
board_status.sh: Update permisson of generated cbfstool
If board_status.sh is run as root, it may leave generated files (particularly cbfstool) behind which have permissions that don't match the other files in build/.
This fixes up the permission of cbfstool if it's generated so that the user can run "make clean" and not run into errors.
Change-Id: I026c7fa2114f54594a84054a11c8267c6bbb0344 Signed-off-by: David Hendricks dhendrix@chromium.org --- util/board_status/board_status.sh | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/util/board_status/board_status.sh b/util/board_status/board_status.sh index 49d2c73..d44e138 100755 --- a/util/board_status/board_status.sh +++ b/util/board_status/board_status.sh @@ -218,6 +218,13 @@ tmpdir=$(mktemp -d --tmpdir coreboot_board_status.XXXXXXXX) cbfstool_cmd="build/cbfstool" if test ! -x build/cbfstool; then make -C util/cbfstool/ && cp util/cbfstool/cbfstool build/cbfstool + # Since this script may be run as root (particularly if run on the + # target system), update permission of generated cbfstool file to + # avoid leaving files with mismatched ownership. + local owner=$(stat --printf="%U" build/coreboot.rom) + local group=$(stat --printf="%G" build/coreboot.rom) + chmod "${owner}:${group}" build/cbfstool + make -C util/cbfstool clean fi test_cmd $LOCAL "$cbfstool_cmd" $cbfstool_cmd build/coreboot.rom extract -n config -f ${tmpdir}/config.txt