Unverified Commit 494fd6b3 by Scott Moser Committed by Stéphane Graber

lxc-ubuntu-cloud: pass --numeric-owner and -p to untar

Just following up here, Serge raised the question of whether or not the other two invocations of 'tar' in this script need '--numeric-owner'. They probably should have it, although its of little concern because the 'build_root_tgz' path is only taken if there is no '-root.tar.gz' file for download, and the only supported ubuntu release without the -root.tar.gz download is 10.04 at this point. Anyway, below is a more complete diff, also including a fix as '--numeric-uid' is not a valid option to tar. The name is '--numeric-owner'. Signed-off-by: 's avatarScott Moser <smoser@ubuntu.com> Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent 034ef75d
...@@ -340,7 +340,7 @@ build_root_tgz() ...@@ -340,7 +340,7 @@ build_root_tgz()
echo "Creating new cached cloud image rootfs" echo "Creating new cached cloud image rootfs"
tar --wildcards -zxf $tarname $imgname tar --wildcards -zxf $tarname $imgname
mount -o loop $imgname $xdir mount -o loop $imgname $xdir
(cd $xdir; tar zcf ../$filename .) (cd $xdir; tar --numeric-owner -cpzf ../$filename .)
umount $xdir umount $xdir
rm -f $tarname $imgname rm -f $tarname $imgname
rmdir $xdir rmdir $xdir
...@@ -371,7 +371,7 @@ do_extract_rootfs() { ...@@ -371,7 +371,7 @@ do_extract_rootfs() {
echo "Extracting container rootfs" echo "Extracting container rootfs"
mkdir -p $rootfs mkdir -p $rootfs
cd $rootfs cd $rootfs
tar -zxf $cache/$filename tar --numeric-owner -xpzf $cache/$filename
} }
if [ -n "$tarball" ]; then if [ -n "$tarball" ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment