diff options
author | jiankang.fan <jiankang.fan@samsung.com> | 2016-03-08 19:51:59 +0800 |
---|---|---|
committer | jiankang.fan <jiankang.fan@samsung.com> | 2016-03-08 19:51:59 +0800 |
commit | 34835047a42fb933e91b87ac3cd36d886c14e1de (patch) | |
tree | 0354bc2b4fe6863c09bd6762e1ce33c88eee1fb2 | |
parent | b6aa3b89a1b1e21d4c52852cde651d060f6e57a4 (diff) | |
download | build-34835047a42fb933e91b87ac3cd36d886c14e1de.tar.gz build-34835047a42fb933e91b87ac3cd36d886c14e1de.tar.bz2 build-34835047a42fb933e91b87ac3cd36d886c14e1de.zip |
Merge patch (Update uid/gid of build root if uid/gid is not match)
Change-Id: Iaa1f3628dd21cb4d45244f6a60ca2e632ad99087
Signed-off-by: jiankang.fan <jiankang.fan@samsung.com>
-rwxr-xr-x | build | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -1165,13 +1165,11 @@ for RECIPEFILE in "${RECIPEFILES[@]}" ; do chown "$ABUILD_UID:$ABUILD_GID" $BUILD_ROOT/home/abuild else if ! egrep "^abuild:x?:${ABUILD_UID}:${ABUILD_GID}" >/dev/null <$BUILD_ROOT/etc/passwd ; then - echo "abuild user present in the buildroot ($BUILD_ROOT) but uid:gid does not match" - echo "buildroot currently using:" - egrep "^abuild:" <$BUILD_ROOT/etc/passwd - echo "build script attempting to use:" - echo "abuild::${ABUILD_UID}:${ABUILD_GID}:..." - echo "build aborting" - cleanup_and_exit 1 + sed -i '/^abuild:/d' $BUILD_ROOT/etc/passwd + sed -i '/^abuild:/d' $BUILD_ROOT/etc/group + echo "abuild:x:${ABUILD_UID}:${ABUILD_GID}:Autobuild:/home/abuild:/bin/bash" >>$BUILD_ROOT/etc/passwd + echo "abuild:x:${ABUILD_GID}:" >>$BUILD_ROOT/etc/group + chown "$ABUILD_UID:$ABUILD_GID" $BUILD_ROOT/home/abuild -R fi fi if test -f $BUILD_ROOT/etc/shadow ; then |