summaryrefslogtreecommitdiffstats
path: root/tools/mktarball.sh
diff options
context:
space:
mode:
authorThierry Strudel <tstrudel@google.com>2015-07-09 09:54:55 -0700
committerThierry Strudel <tstrudel@google.com>2015-07-10 10:55:54 -0700
commit74a81e6633276d92337749a5ee9d921207814dd4 (patch)
tree5076db7d8d014819a8a0a97de80359693ef7e050 /tools/mktarball.sh
parent26b3ec5a689f187b3174d1f774d40d879730b729 (diff)
downloadbuild-74a81e6633276d92337749a5ee9d921207814dd4.zip
build-74a81e6633276d92337749a5ee9d921207814dd4.tar.gz
build-74a81e6633276d92337749a5ee9d921207814dd4.tar.bz2
fix device specific fs_config on build server
fs_config function from libcutils, in order to properly set the xattr FS used to define device specific uid, gid, permissions and capabilities, now needs TARGET_OUT make variable to be passed explicitly to all tools using it: fs_config fs_get_stats used by mktarball.sh make_ext4fs used by mkuserimg.sh mksquashfs used by mksquashfsimage.sh Bug: 21989305 Bug: 22048934 Change-Id: I6caf9cf870882fce2ead93027767092c29b75ded Signed-off-by: Thierry Strudel <tstrudel@google.com>
Diffstat (limited to 'tools/mktarball.sh')
-rwxr-xr-xtools/mktarball.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/mktarball.sh b/tools/mktarball.sh
index 3e32006..ef0fe86 100755
--- a/tools/mktarball.sh
+++ b/tools/mktarball.sh
@@ -5,8 +5,9 @@
# $3: subdir to tar up (from $2)
# $4: target tar name
# $5: target tarball name (usually $(3).bz2)
+# $6: TARGET_OUT path to query device specific FS configs
-if [ $# -ne 5 ]; then
+if [ $# -ne 6 ]; then
echo "Error: wrong number of arguments in cmd: $0 $* "
exit 1
fi
@@ -16,6 +17,7 @@ start_dir=`readlink -f $2`
dir_to_tar=$3
target_tar=`readlink -f $4`
target_tarball=`readlink -f $5`
+target_out=`readlink -f $6`
cd $2
@@ -28,7 +30,7 @@ files=`find ${dir_to_tar} \! -type d -print`
for f in ${subdirs} ${files} ; do
curr_perms=`stat -c 0%a $f`
[ -d "$f" ] && is_dir=1 || is_dir=0
- new_info=`${fs_get_stats} ${curr_perms} ${is_dir} ${f}`
+ new_info=`${fs_get_stats} ${curr_perms} ${is_dir} ${f} ${target_out}`
new_uid=`echo ${new_info} | awk '{print $1;}'`
new_gid=`echo ${new_info} | awk '{print $2;}'`
new_perms=`echo ${new_info} | awk '{print $3;}'`