unpackfs: Make rsync preserve everything, exclude special paths.

Add the following flags to rsync:
* `-H, --hard-links            preserve hard links`
* `-A, --acls                  preserve ACLs (implies --perms)`
* `-X, --xattrs                preserve extended attributes`
(i.e., the preservation options not already implied by -a).

Also exclude the special paths that do not make sense to rsync, because
reading the extended attributes from those can cause errors, at least
with SELinux enabled.

This fixes installation of Fedora systems with SELinux enabled.
This commit is contained in:
Kevin Kofler 2014-11-27 18:36:46 +01:00
parent 0c3f88077d
commit 8591dcf731

View File

@ -53,7 +53,7 @@ def file_copy(source, dest, progress_cb):
# "/dest", then files will be copied in "/dest/bar".
source += "/"
process = subprocess.Popen(['rsync', '-ar', '--progress', source, dest],
process = subprocess.Popen(['rsync', '-aHAXr', '--exclude', '/dev/', '--exclude', '/proc/', '--exclude', '/sys/', '--exclude', '/run/', '--progress', source, dest],
env=at_env,
bufsize=1,
stdout=subprocess.PIPE,