[coreboot-gerrit] Patch set updated for coreboot: b4c8ce1 board_status.sh: Update ownership of generated cbfstool

David Hendricks (dhendrix@chromium.org) gerrit at coreboot.org
Sun Oct 19 11:58:38 CEST 2014


David Hendricks (dhendrix at chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7132

-gerrit

commit b4c8ce1e3b2a7d580953562bcffedadfe85be036
Author: David Hendricks <dhendrix at chromium.org>
Date:   Sun Oct 19 02:30:49 2014 -0700

    board_status.sh: Update ownership of generated cbfstool
    
    If board_status.sh is run as root, it may leave generated files
    behind (particularly cbfstool) with ownership that does not match
    the other files in build/.
    
    This fixes up the ownership of cbfstool when 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 at 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



More information about the coreboot-gerrit mailing list