included rootfs_path variable in tar command
This commit is contained in:
parent
f52835cb58
commit
2790261e58
1 changed files with 5 additions and 1 deletions
|
@ -109,7 +109,11 @@ module Vagrant
|
|||
Dir.chdir base_path do
|
||||
@logger.info "Compressing '#{rootfs_path}' rootfs to #{target_path}"
|
||||
@sudo_wrapper.run('rm', '-f', 'rootfs.tar.gz')
|
||||
@sudo_wrapper.run('tar', '--numeric-owner', '-czf', target_path, './rootfs')
|
||||
# "vagrant package" will copy the existing lxc-template in the new box file
|
||||
# To keep this function backwards compatible with existing boxes, the path
|
||||
# included in the tarball needs to have the same amount of path components (2)
|
||||
# that will be stripped before extraction, hence the './.'
|
||||
@sudo_wrapper.run('tar', '--numeric-owner', '-czf', target_path, '-C', "#{rootfs_path}", './.')
|
||||
|
||||
@logger.info "Changing rootfs tarball owner"
|
||||
user_details = Etc.getpwnam(Etc.getlogin)
|
||||
|
|
Loading…
Reference in a new issue