From 8591dcf731cbfbc9d219244911756460b331c8c3 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Thu, 27 Nov 2014 18:36:46 +0100 Subject: [PATCH] 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. --- src/modules/unpackfs/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/unpackfs/main.py b/src/modules/unpackfs/main.py index c1e1a7ec2..0ae17d08a 100644 --- a/src/modules/unpackfs/main.py +++ b/src/modules/unpackfs/main.py @@ -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,